Correctly read the BARNOWL_DATA_DIR environment variable. getenv() just returns the environment variable value, not "KEY=value". So there's no need to strchr for '=' after reading the BARNOWL_DATA_DIR, if it's set.