diff --git a/cJSON_Utils.c b/cJSON_Utils.c index 92bb0b4ede8c741eee7e54c921b5fd7132c8eb18..5d5422de49fded06b8614a9aaf862b3d958e608a 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -526,12 +526,7 @@ CJSON_PUBLIC(int) cJSONUtils_ApplyPatches(cJSON *object, cJSON *patches) { int err = 0; - if (patches == NULL) - { - return 1; - } - - if (cJSON_IsArray(patches)) + if (!cJSON_IsArray(patches)) { /* malformed patches. */ return 1;