diff options
author | Sami Kerola | 2018-12-10 21:41:18 +0100 |
---|---|---|
committer | Sami Kerola | 2018-12-10 21:41:18 +0100 |
commit | a81a48779b858b7ab49fff3ed52dec21a26049a5 (patch) | |
tree | 62110076d1d497eb5469200e9f266f1460a35bab /login-utils | |
parent | libsmartcols: fix variable shadowing (diff) | |
download | kernel-qcow2-util-linux-a81a48779b858b7ab49fff3ed52dec21a26049a5.tar.gz kernel-qcow2-util-linux-a81a48779b858b7ab49fff3ed52dec21a26049a5.tar.xz kernel-qcow2-util-linux-a81a48779b858b7ab49fff3ed52dec21a26049a5.zip |
lslogins: remove duplicate NULL check
Having this excess NULL check in place causes small performance penalty, and
makes compiler to guess wrong if a null should be checked. To me getting
rid of false positive warning is more useful.
login-utils/lslogins.c:634:7: warning: potential null pointer dereference
[-Wnull-dereference]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'login-utils')
-rw-r--r-- | login-utils/lslogins.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c index e2a0d43df..280768e7a 100644 --- a/login-utils/lslogins.c +++ b/login-utils/lslogins.c @@ -623,7 +623,7 @@ static int valid_pwd(const char *str) return 0; /* salt$ */ - for (; p && *p; p++) { + for (; *p; p++) { if (*p == '$') { p++; break; |