mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-29 02:59:34 -05:00
Replace some calloc/realloc with ch_calloc/ch_realloc for consistency.
This commit is contained in:
parent
28ab9fcaf5
commit
ef7b93242d
1 changed files with 3 additions and 3 deletions
|
|
@ -95,7 +95,7 @@ at_append_to_list(
|
|||
list = *listp;
|
||||
if ( !list ) {
|
||||
size = 2;
|
||||
list = calloc(size, sizeof(AttributeType *));
|
||||
list = ch_calloc(size, sizeof(AttributeType *));
|
||||
if ( !list ) {
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ at_append_to_list(
|
|||
list1++;
|
||||
}
|
||||
size += 2;
|
||||
list1 = realloc(list, size*sizeof(AttributeType *));
|
||||
list1 = ch_realloc(list, size*sizeof(AttributeType *));
|
||||
if ( !list1 ) {
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -144,7 +144,7 @@ at_delete_from_list(
|
|||
}
|
||||
list[i] = NULL;
|
||||
/* Tell the runtime this can be shrinked */
|
||||
list1 = realloc(list, (i+1)*sizeof(AttributeType **));
|
||||
list1 = ch_realloc(list, (i+1)*sizeof(AttributeType **));
|
||||
if ( !list1 ) {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue