From: nekral-guest Date: Tue, 10 Jun 2008 22:10:47 +0000 (+0000) Subject: Avoid implicit conversion of pointers to booleans. X-Git-Tag: 4.1.3~400 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55b2e44814b179ce9a7a8df10b29050019ed9275;p=shadow Avoid implicit conversion of pointers to booleans. --- diff --git a/src/chsh.c b/src/chsh.c index da45706d..b40ebc70 100644 --- a/src/chsh.c +++ b/src/chsh.c @@ -159,7 +159,7 @@ static bool shell_is_listed (const char *sh) return false; } - while (fgets (buf, sizeof (buf), fp)) { + while (fgets (buf, sizeof (buf), fp) == buf) { cp = strrchr (buf, '\n'); if (NULL != cp) { *cp = '\0';