summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchl <chl@openbsd.org>2007-09-25 09:55:33 +0000
committerchl <chl@openbsd.org>2007-09-25 09:55:33 +0000
commitfe01e0ec39249fa148989c0c3eedaa2b59f33b09 (patch)
treee704d7e54886bcee417b1426c7346ba20256db53
parentcheck fgets return value (diff)
downloadwireguard-openbsd-fe01e0ec39249fa148989c0c3eedaa2b59f33b09.tar.xz
wireguard-openbsd-fe01e0ec39249fa148989c0c3eedaa2b59f33b09.zip
remove unneeded feof
with help and ok ray@
-rw-r--r--sbin/restore/tape.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index efd5b525cfe..033e5332a59 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tape.c,v 1.35 2007/09/13 09:19:56 chl Exp $ */
+/* $OpenBSD: tape.c,v 1.36 2007/09/25 09:55:33 chl Exp $ */
/* $NetBSD: tape.c,v 1.26 1997/04/15 07:12:25 lukem Exp $ */
/*
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)tape.c 8.6 (Berkeley) 9/13/94";
#else
-static const char rcsid[] = "$OpenBSD: tape.c,v 1.35 2007/09/13 09:19:56 chl Exp $";
+static const char rcsid[] = "$OpenBSD: tape.c,v 1.36 2007/09/25 09:55:33 chl Exp $";
#endif
#endif /* not lint */
@@ -335,8 +335,7 @@ again:
do {
fprintf(stderr, "Specify next volume #: ");
(void)fflush(stderr);
- if (fgets(buf, sizeof buf, terminal) == NULL ||
- feof(terminal))
+ if (fgets(buf, sizeof buf, terminal) == NULL)
exit(1);
buf[strcspn(buf, "\n")] = '\0';