diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-03-05 16:54:00 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-03-05 16:54:00 +0000 |
commit | 758c44b25cccdb193746352a25a8cd999968669f (patch) | |
tree | 1bc2115c3ec1a929b06bcdec942d783c6887aa6f /lib/libc | |
parent | 3f9fb08eb4c12f684748f313c481a10f65ac9493 (diff) |
style(9) for the example; Alexander Yurchenko
Diffstat (limited to 'lib/libc')
-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); } |