summaryrefslogtreecommitdiff
path: root/games/battlestar/getcom.c
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2006-10-10 21:38:17 +0000
committerChad Loder <cloder@cvs.openbsd.org>2006-10-10 21:38:17 +0000
commitca817738feb3dbccb047a79a8bba9d9ef8d35bef (patch)
tree1b3c3d53c613c58ec3dd701858f5ea0679e7260a /games/battlestar/getcom.c
parent5322f980d2221f7cb9600d5bd4b0e15ab30164bd (diff)
fgets(3) returns NULL on error, not 0. No functional change, but it makes
the code easier to read. OK deraadt
Diffstat (limited to 'games/battlestar/getcom.c')
-rw-r--r--games/battlestar/getcom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/battlestar/getcom.c b/games/battlestar/getcom.c
index e7bfb98e2b4..77491d27571 100644
--- a/games/battlestar/getcom.c
+++ b/games/battlestar/getcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getcom.c,v 1.12 2004/07/10 07:26:22 deraadt Exp $ */
+/* $OpenBSD: getcom.c,v 1.13 2006/10/10 21:38:16 cloder Exp $ */
/* $NetBSD: getcom.c,v 1.3 1995/03/21 15:07:30 cgd Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getcom.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: getcom.c,v 1.12 2004/07/10 07:26:22 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: getcom.c,v 1.13 2006/10/10 21:38:16 cloder Exp $";
#endif
#endif /* not lint */
@@ -45,7 +45,7 @@ getcom(char *buf, int size, const char *prompt, const char *error)
{
for (;;) {
fputs(prompt, stdout);
- if (fgets(buf, size, stdin) == 0) {
+ if (fgets(buf, size, stdin) == NULL) {
if (feof(stdin))
die(0);
clearerr(stdin);