From 15597c6c38e02ec9a456a22487b9e2f84d771a69 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 3 Jan 2020 18:59:41 +0100 Subject: [PATCH] cppcheck --- client/cmdhw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/cmdhw.c b/client/cmdhw.c index a35f15b5e..b71512432 100644 --- a/client/cmdhw.c +++ b/client/cmdhw.c @@ -539,9 +539,8 @@ static int CmdPing(const char *Cmd) { data[i] = i & 0xFF; SendCommandNG(CMD_PING, data, len); if (WaitForResponseTimeout(CMD_PING, &resp, 1000)) { - bool error = false; if (len) { - error = memcmp(data, resp.data.asBytes, len) != 0; + bool error = (memcmp(data, resp.data.asBytes, len) != 0); PrintAndLogEx((error) ? ERR : SUCCESS, "Ping response " _GREEN_("received") "and content is %s", error ? _RED_("NOT ok") : _GREEN_("OK")); } else { PrintAndLogEx(SUCCESS, "Ping response " _GREEN_("received"));