mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
MSVC: Fix warning about assignment in condition
This commit is contained in:
parent
d1c2e2df4a
commit
ac368e9dfb
3
cJSON.c
3
cJSON.c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user