From ad1640d56d176bb0b3803adc1080b03469363a31 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Wed, 13 Mar 2019 14:38:41 +0500 Subject: [PATCH] env_set.c: remove redundant check found by cppcheck [env_set.c:332] -> [env_set.c:333]: (warning) Either the condition '!msg' is redundant or there is possible null pointer dereference: msg. --- env_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env_set.c b/env_set.c index 2b9648a..f551075 100644 --- a/env_set.c +++ b/env_set.c @@ -330,7 +330,7 @@ process_setenv(connection_t *c, UNUSED time_t timestamp, const char *msg) msg += strlen("setenv "); /* character following "setenv" */ msg += strspn(msg, " \t"); /* skip leading space */ - if (!msg || msg[0] == '\0') + if (msg[0] == '\0') { WriteStatusLog(c, L"GUI> ", L"Error: Name empty in echo setenv", false); return;