summaryrefslogtreecommitdiffstats
path: root/battlestar
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2012-01-16 17:38:16 +0000
committerchristos <christos@NetBSD.org>2012-01-16 17:38:16 +0000
commit5460cd550b3ec9201340ebc71228a56350259fc7 (patch)
tree775299b7c465596343b632a42572a5db1e3875c2 /battlestar
parent05bdcd67f61db7fa26da299af5be7643d573a234 (diff)
downloadbsdgames-darwin-5460cd550b3ec9201340ebc71228a56350259fc7.tar.gz
bsdgames-darwin-5460cd550b3ec9201340ebc71228a56350259fc7.tar.zst
bsdgames-darwin-5460cd550b3ec9201340ebc71228a56350259fc7.zip
PR/45842: Henning Petersen: compare fgets with NULL not 0
Diffstat (limited to 'battlestar')
-rw-r--r--battlestar/getcom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/battlestar/getcom.c b/battlestar/getcom.c
index 46bcd2c1..7e13b5f9 100644
--- a/battlestar/getcom.c
+++ b/battlestar/getcom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getcom.c,v 1.13 2005/07/01 06:04:54 jmc Exp $ */
+/* $NetBSD: getcom.c,v 1.14 2012/01/16 17:38:16 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getcom.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: getcom.c,v 1.13 2005/07/01 06:04:54 jmc Exp $");
+__RCSID("$NetBSD: getcom.c,v 1.14 2012/01/16 17:38:16 christos 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();
clearerr(stdin);