From a81a48779b858b7ab49fff3ed52dec21a26049a5 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Mon, 10 Dec 2018 20:41:18 +0000 Subject: 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 --- login-utils/lslogins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'login-utils') 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; -- cgit v1.2.3-55-g7522