From 8db7e6d320f336367fb94d6b7133cd2e94816b63 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Tue, 27 Sep 2016 23:39:54 +0700 Subject: [PATCH] reformatting: cJSON_InitHooks --- cJSON.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cJSON.c b/cJSON.c index ed60741..0ba5925 100644 --- a/cJSON.c +++ b/cJSON.c @@ -81,14 +81,16 @@ static char* cJSON_strdup(const char* str) void cJSON_InitHooks(cJSON_Hooks* hooks) { - if (!hooks) { /* Reset hooks */ + if (!hooks) + { + /* Reset hooks */ cJSON_malloc = malloc; cJSON_free = free; return; } - cJSON_malloc = (hooks->malloc_fn)?hooks->malloc_fn:malloc; - cJSON_free = (hooks->free_fn)?hooks->free_fn:free; + cJSON_malloc = (hooks->malloc_fn) ? hooks->malloc_fn : malloc; + cJSON_free = (hooks->free_fn) ? hooks->free_fn : free; } /* Internal constructor. */