From 96dbfe4e2de39c163a56b1d941ba673c95154896 Mon Sep 17 00:00:00 2001 From: kevlo Date: Fri, 13 Jan 2012 06:51:15 +0000 Subject: fgets(3) returns a pointer, so compare against NULL, not integer 0. --- usr.bin/tftp/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/tftp/main.c') diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 0092827..669299b 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -734,7 +734,7 @@ command(void) history(hist, &he, H_ENTER, bp); } else { line[0] = 0; - if (fgets(line, sizeof line , stdin) == 0) { + if (fgets(line, sizeof line , stdin) == NULL) { if (feof(stdin)) { exit(txrx_error); } else { -- cgit v1.1