diff --git a/ldap2dns.c b/ldap2dns.c index 45980f6..cd3846b 100644 --- a/ldap2dns.c +++ b/ldap2dns.c @@ -139,8 +139,8 @@ static void die_exit(const char* message) static void set_datadir(void) { char* ev = getenv("TINYDNSDIR"); - if (ev == NULL) - char* ev = getenv("LDAP2DNS_TINYDNSDIR"); + if (!ev) + ev = getenv("LDAP2DNS_TINYDNSDIR"); int len; tinydns_textfile[0] = '\0'; @@ -324,6 +324,11 @@ static int parse_options() for (i = 0; i