From 1cb2ae889ced71d009de0721bca901bb9a621efa Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 12 Apr 2019 13:43:36 +0200 Subject: [PATCH] Avoid Coverity BAD_COMPARE, but honestly I don't get it at all... int readCOTAGUid(void) { >>> CID 337768: Incorrect expression (BAD_COMPARE) >>> This implicit conversion to a function pointer is suspicious: "CmdCOTAGRead > NULL". 130 return CmdCOTAGRead > 0; This is just an int compared to zero, why it thinks it's a null pointer?? --- client/cmdlfcotag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cmdlfcotag.c b/client/cmdlfcotag.c index 5ccdbfb68..eef243394 100644 --- a/client/cmdlfcotag.c +++ b/client/cmdlfcotag.c @@ -127,5 +127,5 @@ int demodCOTAG(void) { } int readCOTAGUid(void) { - return CmdCOTAGRead > 0; + return CmdCOTAGRead == 1; }