Remove always true condition in cJSON.c (#539)

This commit is contained in:
Jordan IMBERT 2020-12-17 10:07:18 +01:00 committed by GitHub
parent 7b6645794d
commit 9226e4ed8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -511,10 +511,8 @@ static unsigned char* ensure(printbuffer * const p, size_t needed)
return NULL;
}
if (newbuffer)
{
memcpy(newbuffer, p->buffer, p->offset + 1);
}
p->hooks.deallocate(p->buffer);
}
p->length = newsize;