From: Robert Date: Thu, 2 Apr 2020 17:23:10 +0000 (+0200) Subject: Changed order of calloc args to match stdlib X-Git-Tag: json-c-0.14-20200419~43^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56f81811c2090c3d1a48523e018ed2eca7a58217;p=json-c Changed order of calloc args to match stdlib Although it is currently working, it's worth to stick with the stdlib definition to avoid further problems --- diff --git a/json_object.c b/json_object.c index 9646164..cb518af 100644 --- a/json_object.c +++ b/json_object.c @@ -228,7 +228,7 @@ static struct json_object* json_object_new(enum json_type o_type) { struct json_object *jso; - jso = (struct json_object*)calloc(sizeof(struct json_object), 1); + jso = (struct json_object*)calloc(1, sizeof(struct json_object)); if (!jso) return NULL; jso->o_type = o_type;