]> granicus.if.org Git - shadow/commitdiff
Avoid implicit conversion of pointers to booleans.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 10 Jun 2008 22:10:47 +0000 (22:10 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 10 Jun 2008 22:10:47 +0000 (22:10 +0000)
src/chsh.c

index da45706dc10324d58524a926d081730fac021fe6..b40ebc706cc8ec6f9403df5c1f2a2b4751ebdc93 100644 (file)
@@ -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';