From 5460cd550b3ec9201340ebc71228a56350259fc7 Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 16 Jan 2012 17:38:16 +0000 Subject: PR/45842: Henning Petersen: compare fgets with NULL not 0 --- battlestar/getcom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'battlestar') 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); -- cgit v1.2.3-56-ge451