summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorray <ray@openbsd.org>2007-02-08 03:35:09 +0000
committerray <ray@openbsd.org>2007-02-08 03:35:09 +0000
commit9d739794640a31e8252fa62d6dd778558a80a5d3 (patch)
tree25016203ce4d06e522e6d1eb319fe94991a5bd4c
parentRemove double semicolons. (diff)
downloadwireguard-openbsd-9d739794640a31e8252fa62d6dd778558a80a5d3.tar.xz
wireguard-openbsd-9d739794640a31e8252fa62d6dd778558a80a5d3.zip
When getc() returns EOF, either feof() or ferror() will return true,
so no need to check them. Removes a bitwise OR that should have been a logical OR as well. From Pierre Riteau <pierre dot riteau at free dot fr>. OK joris@.
-rw-r--r--usr.bin/rcs/ident.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/rcs/ident.c b/usr.bin/rcs/ident.c
index 48f008cf4a0..595c2c3bfe0 100644
--- a/usr.bin/rcs/ident.c
+++ b/usr.bin/rcs/ident.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ident.c,v 1.22 2006/08/07 19:32:49 ray Exp $ */
+/* $OpenBSD: ident.c,v 1.23 2007/02/08 03:35:09 ray Exp $ */
/*
* Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -112,7 +112,7 @@ ident_line(FILE *fp)
bp = rcs_buf_alloc(512, BUF_AUTOEXT);
while ((c = getc(fp)) != VALDELIM) {
- if (c == EOF && (feof(fp) | ferror(fp)))
+ if (c == EOF)
goto out;
if (isalpha(c))
@@ -124,7 +124,7 @@ ident_line(FILE *fp)
rcs_buf_putc(bp, VALDELIM);
while ((c = getc(fp)) != KEYDELIM) {
- if (c == EOF && (feof(fp) | ferror(fp)))
+ if (c == EOF)
goto out;
if (c == '\n')