]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Changed order of calloc args to match stdlib (2) 563/head
authorRobert <roby_p97@yahoo.com>
Thu, 2 Apr 2020 17:28:55 +0000 (19:28 +0200)
committerGitHub <noreply@github.com>
Thu, 2 Apr 2020 17:28:55 +0000 (19:28 +0200)
Although it is currently working, it's worth to stick with the stdlib definition to avoid further problems

arraylist.c

index 8a88ed16d1919dd3cd82669495f674475fbaec7f..3441ce1e022c96772d7c2d77a9d484bdb55a8741 100644 (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;
   }