Browse Source

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
tags/json-c-0.14-20200419
Robert GitHub 5 years ago
parent
commit
56f81811c2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      json_object.c

+ 1
- 1
json_object.c View File

@@ -228,7 +228,7 @@ static struct json_object* json_object_new(enum json_type o_type)
{ {
struct json_object *jso; 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) if (!jso)
return NULL; return NULL;
jso->o_type = o_type; jso->o_type = o_type;


Loading…
Cancel
Save