MSVC: Fix warning about assignment in condition

This commit is contained in:
Max Bruckner 2017-06-17 14:33:55 +02:00
parent d1c2e2df4a
commit ac368e9dfb
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}