summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2012-01-13 06:51:15 +0000
committerkevlo <kevlo@FreeBSD.org>2012-01-13 06:51:15 +0000
commit96dbfe4e2de39c163a56b1d941ba673c95154896 (patch)
tree2f39c41e193505df2d97cf331a8647c9f25c53c9 /usr.sbin/config
parent6898680f64062d1debcda280c9b38d4e54905c66 (diff)
downloadFreeBSD-src-96dbfe4e2de39c163a56b1d941ba673c95154896.zip
FreeBSD-src-96dbfe4e2de39c163a56b1d941ba673c95154896.tar.gz
fgets(3) returns a pointer, so compare against NULL, not integer 0.
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/mkmakefile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 4cbc135..937fb0f 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1993, 19801990
+ * Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -154,7 +154,7 @@ makefile(void)
fprintf(ofp, "PROFLEVEL=%d\n", profiling);
if (*srcdir != '\0')
fprintf(ofp,"S=%s\n", srcdir);
- while (fgets(line, BUFSIZ, ifp) != 0) {
+ while (fgets(line, BUFSIZ, ifp) != NULL) {
if (*line != '%') {
fprintf(ofp, "%s", line);
continue;
@@ -204,7 +204,7 @@ makehints(void)
ifp = fopen(hint->hint_name, "r");
if (ifp == NULL)
err(1, "%s", hint->hint_name);
- while (fgets(line, BUFSIZ, ifp) != 0) {
+ while (fgets(line, BUFSIZ, ifp) != NULL) {
/* zap trailing CR and/or LF */
while ((s = strrchr(line, '\n')) != NULL)
*s = '\0';
@@ -266,7 +266,7 @@ makeenv(void)
fprintf(ofp, "int envmode = %d;\n", envmode);
fprintf(ofp, "char static_env[] = {\n");
if (ifp) {
- while (fgets(line, BUFSIZ, ifp) != 0) {
+ while (fgets(line, BUFSIZ, ifp) != NULL) {
/* zap trailing CR and/or LF */
while ((s = strrchr(line, '\n')) != NULL)
*s = '\0';
OpenPOWER on IntegriCloud