summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2006-10-10 21:38:17 +0000
committerChad Loder <cloder@cvs.openbsd.org>2006-10-10 21:38:17 +0000
commitca817738feb3dbccb047a79a8bba9d9ef8d35bef (patch)
tree1b3c3d53c613c58ec3dd701858f5ea0679e7260a /usr.sbin
parent5322f980d2221f7cb9600d5bd4b0e15ab30164bd (diff)
fgets(3) returns NULL on error, not 0. No functional change, but it makes
the code easier to read. OK deraadt
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bind/bin/dig/dig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bind/bin/dig/dig.c b/usr.sbin/bind/bin/dig/dig.c
index 9e1f53f9b35..430fd38962b 100644
--- a/usr.sbin/bind/bin/dig/dig.c
+++ b/usr.sbin/bind/bin/dig/dig.c
@@ -1367,7 +1367,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
}
if (batchfp != NULL) {
while (fgets(batchline, sizeof(batchline),
- batchfp) != 0) {
+ batchfp) != NULL) {
debug("config line %s", batchline);
bargc = 1;
input = batchline;
@@ -1513,7 +1513,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
}
/* XXX Remove code dup from shutdown code */
next_line:
- if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
+ if (fgets(batchline, sizeof(batchline), batchfp) != NULL) {
bargc = 1;
debug("batch line %s", batchline);
if (batchline[0] == '\r' || batchline[0] == '\n'
@@ -1582,7 +1582,7 @@ dighost_shutdown(void) {
return;
}
- if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
+ if (fgets(batchline, sizeof(batchline), batchfp) != NULL) {
debug("batch line %s", batchline);
bargc = 1;
input = batchline;