From a926b417e414e7f05ee9a1e6fb9642e8c89c78c2 Mon Sep 17 00:00:00 2001 From: Ray Lai Date: Thu, 8 Feb 2007 03:35:10 +0000 Subject: 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 . OK joris@. --- usr.bin/rcs/ident.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin') 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 * 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') -- cgit v1.2.3