Browse Source

Changed order of calloc args to match stdlib (2)

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 6 years ago
parent
commit
5d9b8e0fef
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
      arraylist.c

+ 1
- 1
arraylist.c View File

@@ -46,7 +46,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;
}


Loading…
Cancel
Save