From: Robert Date: Thu, 2 Apr 2020 17:28:55 +0000 (+0200) Subject: Changed order of calloc args to match stdlib (2) X-Git-Tag: json-c-0.14-20200419~43^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F563%2Fhead;p=thirdparty%2Fjson-c.git 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 --- diff --git a/arraylist.c b/arraylist.c index 8a88ed16..3441ce1e 100644 --- a/arraylist.c +++ b/arraylist.c @@ -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; }