From: Ted Lemon Date: Thu, 21 Oct 1999 12:32:16 +0000 (+0000) Subject: Check result of open() for <0, not NULL. X-Git-Tag: BCTEL_SPECIAL_19991124~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e4618c479e500a32dc3e9ba5cba670db8ec14e1;p=thirdparty%2Fdhcp.git Check result of open() for <0, not NULL. --- diff --git a/common/resolv.c b/common/resolv.c index 5209d26ab..9bc696b2b 100644 --- a/common/resolv.c +++ b/common/resolv.c @@ -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; }