summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fgets.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-03-25 12:03:11 +0000
committerache <ache@FreeBSD.org>1996-03-25 12:03:11 +0000
commit53d0d5e30383bcc8b1c8dead2b0559217b078053 (patch)
tree322c0c05940693ab09276626cb890c2d32e1e79f /lib/libc/stdio/fgets.c
parenta686550504792ef8345deced0e5318e1e636b5cf (diff)
downloadFreeBSD-src-53d0d5e30383bcc8b1c8dead2b0559217b078053.zip
FreeBSD-src-53d0d5e30383bcc8b1c8dead2b0559217b078053.tar.gz
Since n is int now, sanity check must be n <= 0, not simple n == 0
Diffstat (limited to 'lib/libc/stdio/fgets.c')
-rw-r--r--lib/libc/stdio/fgets.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdio/fgets.c b/lib/libc/stdio/fgets.c
index c7c1abc..186a1a1 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
OpenPOWER on IntegriCloud