mirror of
https://github.com/json-c/json-c.git
synced 2026-04-05 13:29:06 +08:00
Remove superfluous NULL checks
This commit is contained in:
@@ -131,7 +131,7 @@ void json_tokener_free(struct json_tokener *tok)
|
|||||||
{
|
{
|
||||||
json_tokener_reset(tok);
|
json_tokener_reset(tok);
|
||||||
if (tok->pb) printbuf_free(tok->pb);
|
if (tok->pb) printbuf_free(tok->pb);
|
||||||
if (tok->stack) free(tok->stack);
|
free(tok->stack);
|
||||||
free(tok);
|
free(tok);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -901,7 +901,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
|
|||||||
|
|
||||||
#ifdef HAVE_SETLOCALE
|
#ifdef HAVE_SETLOCALE
|
||||||
setlocale(LC_NUMERIC, oldlocale);
|
setlocale(LC_NUMERIC, oldlocale);
|
||||||
if (oldlocale) free(oldlocale);
|
free(oldlocale);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (tok->err == json_tokener_success)
|
if (tok->err == json_tokener_success)
|
||||||
|
|||||||
Reference in New Issue
Block a user