Whitespace cleanups.
parent
9a48bde1f9
commit
96f387bbe0
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue