diff options
author | 2002-03-05 16:53:59 +0000 | |
---|---|---|
committer | 2002-03-05 16:53:59 +0000 | |
commit | 3ffd379249fc1b5f8a5766bd3e4bff6b4cc263b6 (patch) | |
tree | 3c1369bbb76a80bb11a2e560dfe5571ff7b8b4a6 /lib/libc/stdio | |
parent | export MD5/SHA1 via /dev/crypto; ok provos@, beck@ (diff) | |
download | wireguard-openbsd-3ffd379249fc1b5f8a5766bd3e4bff6b4cc263b6.tar.xz wireguard-openbsd-3ffd379249fc1b5f8a5766bd3e4bff6b4cc263b6.zip |
style(9) for the example; Alexander Yurchenko
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/fgets.3 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdio/fgets.3 b/lib/libc/stdio/fgets.3 index 14c5885c684..39da3b65258 100644 --- a/lib/libc/stdio/fgets.3 +++ b/lib/libc/stdio/fgets.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fgets.3,v 1.11 2000/12/24 00:30:58 aaron Exp $ +.\" $OpenBSD: fgets.3,v 1.12 2002/03/05 16:53:59 millert Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -127,8 +127,8 @@ string is too long if it does not contain a newline: .Bd -literal char buf[1024], *p; - while (fgets(buf, sizeof(buf), fp)) { - if (!(p = strchr(buf, '\en'))) { + while (fgets(buf, sizeof(buf), fp) != NULL) { + if ((p = strchr(buf, '\en')) != NULL) { fprintf(stderr, "input line too long.\en"); exit(1); } |