From: Karel Zak Date: Wed, 18 Jul 2018 07:46:40 +0000 (+0200) Subject: lslogins: remove redundant condition X-Git-Tag: v2.33-rc1~129 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d43029b72325ff3e3215d9ce20a8acfaf8b5fa9;p=thirdparty%2Futil-linux.git lslogins: remove redundant condition [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 Signed-off-by: Karel Zak --- diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c index a9655e22f9..d77f74dffb 100644 --- a/login-utils/lslogins.c +++ b/login-utils/lslogins.c @@ -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;