diff options
| author | Kevin Lo <kevlo@FreeBSD.org> | 2012-01-13 06:51:15 +0000 |
|---|---|---|
| committer | Kevin Lo <kevlo@FreeBSD.org> | 2012-01-13 06:51:15 +0000 |
| commit | a3a2bf4b67301263d37db3e0702845dbc671f439 (patch) | |
| tree | 2f39c41e193505df2d97cf331a8647c9f25c53c9 /usr.sbin | |
| parent | ab80dcdb1c18421a1f0c62018aa4d223110a9a0c (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/config/mkmakefile.c | 8 | ||||
| -rw-r--r-- | usr.sbin/lpr/lpc/lpc.c | 2 | ||||
| -rw-r--r-- | usr.sbin/timed/timedc/timedc.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 4cbc1356f83ac..937fb0f96e978 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'; diff --git a/usr.sbin/lpr/lpc/lpc.c b/usr.sbin/lpr/lpc/lpc.c index bd95c59591dda..f9fb920dd5407 100644 --- a/usr.sbin/lpr/lpc/lpc.c +++ b/usr.sbin/lpr/lpc/lpc.c @@ -188,7 +188,7 @@ cmdscanner(void) history(hist, &he, H_ENTER, bp); } else { - if (fgets(cmdline, MAX_CMDLINE, stdin) == 0) + if (fgets(cmdline, MAX_CMDLINE, stdin) == NULL) quit(0, NULL); if (cmdline[0] == 0 || cmdline[0] == '\n') break; diff --git a/usr.sbin/timed/timedc/timedc.c b/usr.sbin/timed/timedc/timedc.c index 5423ceaadef6b..7047f57ec46a4 100644 --- a/usr.sbin/timed/timedc/timedc.c +++ b/usr.sbin/timed/timedc/timedc.c @@ -105,7 +105,7 @@ main(argc, argv) printf("timedc> "); (void) fflush(stdout); } - if (fgets(cmdline, sizeof(cmdline), stdin) == 0) + if (fgets(cmdline, sizeof(cmdline), stdin) == NULL) quit(); if (cmdline[0] == 0) break; |
