summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fgets.c
diff options
context:
space:
mode:
authorpjanzen <pjanzen@openbsd.org>2003-05-17 10:28:33 +0000
committerpjanzen <pjanzen@openbsd.org>2003-05-17 10:28:33 +0000
commitcc31c7cdc76a897db3195b460346d80d9d16415d (patch)
tree7fbf0e93146d5564f736a1912c234eb5e7109788 /lib/libc/stdio/fgets.c
parenttweak; 10x jmc (diff)
downloadwireguard-openbsd-cc31c7cdc76a897db3195b460346d80d9d16415d.tar.xz
wireguard-openbsd-cc31c7cdc76a897db3195b460346d80d9d16415d.zip
Document behaviour when size = 1. ok millert@
Diffstat (limited to 'lib/libc/stdio/fgets.c')
-rw-r--r--lib/libc/stdio/fgets.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/stdio/fgets.c b/lib/libc/stdio/fgets.c
index c2bf76f79cf..4e527978998 100644
--- a/lib/libc/stdio/fgets.c
+++ b/lib/libc/stdio/fgets.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: fgets.c,v 1.3 2001/07/09 06:57:44 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: fgets.c,v 1.4 2003/05/17 10:28:33 pjanzen Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@@ -46,6 +46,7 @@ static char rcsid[] = "$OpenBSD: fgets.c,v 1.3 2001/07/09 06:57:44 deraadt Exp $
* Read at most n-1 characters from the given file.
* Stop when a newline has been read, or the count runs out.
* Return first argument, or NULL if no characters were read.
+ * Do not return NULL if n == 1.
*/
char *
fgets(buf, n, fp)