Whitespace cleanups.

pull/179/head
Arnold Robbins 2016-11-09 16:18:52 +02:00
parent 9a48bde1f9
commit 96f387bbe0
2 changed files with 20 additions and 18 deletions

View File

@ -55,7 +55,8 @@ Audit_handler *Audit_handler::m_audit_handler_list[Audit_handler::MAX_AUDIT_HAND
static void * yajl_thd_malloc(void *ctx, size_t sz)
{
THD *thd = (THD*) ctx;
//we allocate plus sizeof(size_t) and stored the alloced size at the start of the pointer (for support of realloc)
// we allocate plus sizeof(size_t) and stored the alloced size
// at the start of the pointer (for support of realloc)
size_t *ptr = (size_t *) thd_alloc(thd, sz + sizeof(size_t));
if (ptr)
{
@ -74,7 +75,8 @@ static void * yajl_thd_realloc(void *ctx, void * previous,
{
if (previous)
{
//copy only the previous allocated size (which is stored just before the pointer passed in)
// copy only the previous allocated size (which is
// stored just before the pointer passed in)
size_t prev_sz = *(((size_t *)previous) - 1);
memcpy(ptr,previous, prev_sz);
}