From 06b47700ae8998743884ca27bf423d2cd67e4921 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Mon, 25 Mar 1996 12:03:11 +0000 Subject: [PATCH] Since n is int now, sanity check must be n <= 0, not simple n == 0 --- lib/libc/stdio/fgets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/stdio/fgets.c b/lib/libc/stdio/fgets.c index c7c1abcbc54..186a1a1136a 100644 --- a/lib/libc/stdio/fgets.c +++ b/lib/libc/stdio/fgets.c @@ -61,7 +61,7 @@ fgets(buf, n, fp) register char *s; register unsigned char *p, *t; - if (n == 0) /* sanity check */ + if (n <= 0) /* sanity check */ return (NULL); #ifdef _THREAD_SAFE