summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorpvalchev <pvalchev@openbsd.org>2002-07-20 18:30:23 +0000
committerpvalchev <pvalchev@openbsd.org>2002-07-20 18:30:23 +0000
commit6ee14528632042f6f223c90095872b417e5c506d (patch)
treeadb5dae77e1c7b2f4d12fcd52c341b53ff9b7359 /lib/libc
parentabort on setusercontext failure; millert ok (diff)
downloadwireguard-openbsd-6ee14528632042f6f223c90095872b417e5c506d.tar.xz
wireguard-openbsd-6ee14528632042f6f223c90095872b417e5c506d.zip
correct check for strchr() failure in EXAMPLE; from pinskia@physics.uc.edu
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/fgets.34
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/fgets.3 b/lib/libc/stdio/fgets.3
index 9ca36d0859f..2937cea99e3 100644
--- a/lib/libc/stdio/fgets.3
+++ b/lib/libc/stdio/fgets.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fgets.3,v 1.13 2002/04/05 01:44:38 aaron Exp $
+.\" $OpenBSD: fgets.3,v 1.14 2002/07/20 18:30:23 pvalchev Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -128,7 +128,7 @@ string is too long if it does not contain a newline:
char buf[1024], *p;
while (fgets(buf, sizeof(buf), fp) != NULL) {
- if ((p = strchr(buf, '\en')) != NULL) {
+ if ((p = strchr(buf, '\en')) == NULL) {
fprintf(stderr, "input line too long.\en");
exit(1);
}