Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arraylist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion json_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down