summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/fgets.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1996-03-25 12:03:11 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1996-03-25 12:03:11 +0000
commit06b47700ae8998743884ca27bf423d2cd67e4921 (patch)
tree322c0c05940693ab09276626cb890c2d32e1e79f /lib/libc/stdio/fgets.c
parentcadce41fec50d47758ffc11e47a5fbb8af656917 (diff)
Notes
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 c7c1abcbc54b..186a1a1136ad 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