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

This commit is contained in:
Jordan IMBERT authored and GitHub committed 2020-12-17 17:07:18 +08:00
1 parent 7b6645794d
commit 9226e4ed8c
1 file changed
+1 -3
+1 -3
View File
@@ -511,10 +511,8 @@ static unsigned char* ensure(printbuffer * const p, size_t needed)
return NULL; return NULL;
} }
if (newbuffer)
{
memcpy(newbuffer, p->buffer, p->offset + 1); memcpy(newbuffer, p->buffer, p->offset + 1);
}
p->hooks.deallocate(p->buffer); p->hooks.deallocate(p->buffer);
} }
p->length = newsize; p->length = newsize;