diff options
author | 2019-06-28 13:41:42 +0000 | |
---|---|---|
committer | 2019-06-28 13:41:42 +0000 | |
commit | 64fca36ce744b78a3d01f3bd966b20faa5ccb6d6 (patch) | |
tree | 3dc37e293f76f0111dd60feb7056dc3761f98593 | |
parent | When system calls indicate an error they return -1, not some arbitrary (diff) | |
download | wireguard-openbsd-64fca36ce744b78a3d01f3bd966b20faa5ccb6d6.tar.xz wireguard-openbsd-64fca36ce744b78a3d01f3bd966b20faa5ccb6d6.zip |
fputc returns EOF
-rw-r--r-- | bin/ed/io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ed/io.c b/bin/ed/io.c index 673a2cad9f9..97306be16b6 100644 --- a/bin/ed/io.c +++ b/bin/ed/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.23 2019/06/27 06:41:36 florian Exp $ */ +/* $OpenBSD: io.c,v 1.24 2019/06/28 13:41:42 deraadt Exp $ */ /* $NetBSD: io.c,v 1.2 1995/03/21 09:04:43 cgd Exp $ */ /* io.c: This file contains the i/o routines for the ed line editor */ @@ -199,7 +199,7 @@ static int put_stream_line(FILE *fp, char *s, int len) { while (len--) { - if (fputc(*s, fp) < 0) { + if (fputc(*s, fp) == EOF) { perror(NULL); seterrmsg("cannot write file"); return ERR; |