]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Check result of open() for <0, not NULL.
authorTed Lemon <source@isc.org>
Thu, 21 Oct 1999 12:32:16 +0000 (12:32 +0000)
committerTed Lemon <source@isc.org>
Thu, 21 Oct 1999 12:32:16 +0000 (12:32 +0000)
common/resolv.c

index 5209d26ab653575646c039b49107b4f004c6826d..9bc696b2ba656f4a40e8dea608cec2ba8f748f56 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: resolv.c,v 1.10 1999/10/07 06:35:44 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: resolv.c,v 1.11 1999/10/21 12:32:16 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -43,7 +43,7 @@ void read_resolv_conf (parse_time)
        struct domain_search_list *dp, *dl, *nd;
        struct iaddr *iaddr;
 
-       if ((file = open (path_resolv_conf, O_RDONLY)) == NULL) {
+       if ((file = open (path_resolv_conf, O_RDONLY)) < 0) {
                log_error ("Can't open %s: %m", path_resolv_conf);
                return;
        }