diff --git a/arraylist.c b/arraylist.c index 5d51a5b..bab903e 100644 --- a/arraylist.c +++ b/arraylist.c @@ -31,7 +31,7 @@ array_list_new(array_list_free_fn *free_fn) arr->size = ARRAY_LIST_DEFAULT_SIZE; arr->length = 0; arr->free_fn = free_fn; - if(!(arr->array = (void**)calloc(sizeof(void*), arr->size))) { + if(!(arr->array = (void**)calloc(arr->size, sizeof(void*)))) { free(arr); return NULL; } diff --git a/json_object.c b/json_object.c index 386f22e..8f79ded 100644 --- a/json_object.c +++ b/json_object.c @@ -214,7 +214,7 @@ static void fjson_object_generic_delete(struct fjson_object* jso) static struct fjson_object* fjson_object_new(const enum fjson_type o_type) { - struct fjson_object *const jso = (struct fjson_object*)calloc(sizeof(struct fjson_object), 1); + struct fjson_object *const jso = (struct fjson_object*)calloc(1, sizeof(struct fjson_object)); if (!jso) return NULL; jso->o_type = o_type;