diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-02-08 03:35:10 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-02-08 03:35:10 +0000 |
commit | a926b417e414e7f05ee9a1e6fb9642e8c89c78c2 (patch) | |
tree | e24faa08f74b386ca8999b6d6f91ad7ded69ae9b /usr.bin/rcs | |
parent | 7fc80487e4b453fc1d9fb8c179628f873f220408 (diff) |
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@.
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r-- | usr.bin/rcs/ident.c | 6 |
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') |