mirror of
https://github.com/json-c/json-c.git
synced 2026-03-22 06:29:06 +08:00
* Rename min and max so we can never clash with C or C++ std library
Ian Atha, thatha at yahoo-inc dot com git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@43 327403b1-1117-474d-bef2-5cb71233fd97
This commit is contained in:
@@ -63,7 +63,7 @@ static int array_list_expand_internal(struct array_list *arr, int max)
|
||||
int new_size;
|
||||
|
||||
if(max < arr->size) return 0;
|
||||
new_size = max(arr->size << 1, max);
|
||||
new_size = json_max(arr->size << 1, max);
|
||||
if(!(t = realloc(arr->array, new_size*sizeof(void*)))) return -1;
|
||||
arr->array = (void**)t;
|
||||
(void)memset(arr->array + arr->size, 0, (new_size-arr->size)*sizeof(void*));
|
||||
|
||||
Reference in New Issue
Block a user