diff --git a/src/ecogrep.c b/src/ecogrep.c index 6d0704c..04c0b77 100644 --- a/src/ecogrep.c +++ b/src/ecogrep.c @@ -190,12 +190,13 @@ int main(int argc, char **argv){ /** * try to get the database name from environment variable * if no database name specified in the -d option - - if (!database && getenv("ECOPCRDB")) + */ + if (database == NULL) + { database = getenv("ECOPCRDB"); - else - errflag++; - */ + if (database == NULL) + errflag++; + } /** * check everything required is provided