Correct wrong comparison in example.

This commit is contained in:
mjl 2002-07-21 19:04:03 +00:00
parent 7de36862a8
commit a32f58ffa9
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: fgets.3,v 1.13 2002/07/10 14:37:16 yamt Exp $
.\" $NetBSD: fgets.3,v 1.14 2002/07/21 19:04:03 mjl Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -146,7 +146,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);
}