]> git.feebdaed.xyz Git - 0xmirror/cJSON.git/commitdiff
fix: remove redundant condition (#605)
authorAlan Wang <948467222@qq.com>
Wed, 25 Aug 2021 07:02:00 +0000 (15:02 +0800)
committerGitHub <noreply@github.com>
Wed, 25 Aug 2021 07:02:00 +0000 (15:02 +0800)
cJSON.c

diff --git a/cJSON.c b/cJSON.c
index 030311ce54db8626e16cb0f49b6baea9e386e46f..04c37f628ea3116d9ad8878a7720ce135787b8a2 100644 (file)
--- a/cJSON.c
+++ b/cJSON.c
@@ -2976,7 +2976,7 @@ CJSON_PUBLIC(cJSON_bool) cJSON_IsRaw(const cJSON * const item)
 
 CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive)
 {
-    if ((a == NULL) || (b == NULL) || ((a->type & 0xFF) != (b->type & 0xFF)) || cJSON_IsInvalid(a))
+    if ((a == NULL) || (b == NULL) || ((a->type & 0xFF) != (b->type & 0xFF)))
     {
         return false;
     }