]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lslogins: remove redundant condition
authorKarel Zak <kzak@redhat.com>
Wed, 18 Jul 2018 07:46:40 +0000 (09:46 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 18 Jul 2018 07:54:05 +0000 (09:54 +0200)
[util-linux-2.32.1/login-utils/lslogins.c:601]: (style) Redundant condition: If '!EXPR', the comparison 'EXPR != '$'' is always true.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/lslogins.c

index a9655e22f9a0f19d0e55832ef2bc83c1873a5ff3..d77f74dffb700db7c734156b149fa3800276b67b 100644 (file)
@@ -601,7 +601,7 @@ static const char *get_pwd_method(const char *str, const char **next, unsigned i
        }
        p++;
 
-       if (!*p || *p != '$')
+       if (*p != '$')
                return NULL;
        if (next)
                *next = ++p;