From: Anmol Sarma Date: Thu, 1 Oct 2015 08:44:03 +0000 (+0530) Subject: Remove superfluous NULL checks X-Git-Tag: json-c-0.13-20171207~179^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F198%2Fhead;p=thirdparty%2Fjson-c.git Remove superfluous NULL checks --- diff --git a/json_tokener.c b/json_tokener.c index 98611d63..752a7b39 100644 --- a/json_tokener.c +++ b/json_tokener.c @@ -131,7 +131,7 @@ void json_tokener_free(struct json_tokener *tok) { json_tokener_reset(tok); if (tok->pb) printbuf_free(tok->pb); - if (tok->stack) free(tok->stack); + free(tok->stack); free(tok); } @@ -901,7 +901,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok, #ifdef HAVE_SETLOCALE setlocale(LC_NUMERIC, oldlocale); - if (oldlocale) free(oldlocale); + free(oldlocale); #endif if (tok->err == json_tokener_success)