mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Converted ch_calloc calls to SLAP_CALLOC.
This commit is contained in:
parent
6e9c21cff8
commit
8669824fd5
@ -94,7 +94,16 @@ syn_insert(
|
||||
|
||||
if ( ssyn->ssyn_oid ) {
|
||||
sir = (struct sindexrec *)
|
||||
ch_calloc( 1, sizeof(struct sindexrec) );
|
||||
SLAP_CALLOC( 1, sizeof(struct sindexrec) );
|
||||
if( sir == NULL ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, ERR,
|
||||
"syn_insert: SLAP_CALLOC Error\n", 0, 0, 0 );
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY, "SLAP_CALLOC Error\n", 0, 0, 0 );
|
||||
#endif
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
sir->sir_name = ssyn->ssyn_oid;
|
||||
sir->sir_syn = ssyn;
|
||||
if ( avl_insert( &syn_index, (caddr_t) sir,
|
||||
@ -120,7 +129,16 @@ syn_add(
|
||||
Syntax *ssyn;
|
||||
int code;
|
||||
|
||||
ssyn = (Syntax *) ch_calloc( 1, sizeof(Syntax) );
|
||||
ssyn = (Syntax *) SLAP_CALLOC( 1, sizeof(Syntax) );
|
||||
if( ssyn == NULL ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( OPERATION, ERR,
|
||||
"syn_add: SLAP_CALLOC Error\n", 0, 0, 0 );
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY, "SLAP_CALLOC Error\n", 0, 0, 0 );
|
||||
#endif
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
|
||||
AC_MEMCPY( &ssyn->ssyn_syn, syn, sizeof(LDAPSyntax) );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user