summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
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/lpr
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/lpr')
-rw-r--r--usr.sbin/lpr/lpc/lpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/lpr/lpc/lpc.c b/usr.sbin/lpr/lpc/lpc.c
index bd95c59..f9fb920 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;
OpenPOWER on IntegriCloud