mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-11-18 19:41:01 +00:00
MSVC: Fix warning about assignment in condition
This commit is contained in:
1 parent
d1c2e2df4a
commit
ac368e9dfb
1 file changed
+2
-1
@@ -147,7 +147,8 @@ static unsigned char* cJSON_strdup(const unsigned char* string, const internal_h
|
||||
}
|
||||
|
||||
length = strlen((const char*)string) + sizeof("");
|
||||
if (!(copy = (unsigned char*)hooks->allocate(length)))
|
||||
copy = (unsigned char*)hooks->allocate(length);
|
||||
if (copy == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user