replaced calloc calls for zap_calloc
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@863 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
a2b4369cc2
commit
f3d2328564
|
@ -111,7 +111,7 @@ TELETONE_API(int) teletone_init_session(teletone_generation_session_t *ts, int b
|
|||
ts->decay_step = 0;
|
||||
ts->decay_factor = 1;
|
||||
if (buflen) {
|
||||
if ((ts->buffer = calloc(buflen, sizeof(teletone_audio_t))) == 0) {
|
||||
if ((ts->buffer = zap_calloc(buflen, sizeof(teletone_audio_t))) == 0) {
|
||||
return -1;
|
||||
}
|
||||
ts->datalen = buflen;
|
||||
|
|
|
@ -1494,7 +1494,7 @@ static zap_state_map_t boost_state_map = {
|
|||
static BOOST_WRITE_MSG_FUNCTION(zap_boost_write_msg)
|
||||
{
|
||||
zap_sangoma_boost_data_t *sangoma_boost_data = span->signal_data;
|
||||
sangomabc_queue_element_t *element = calloc(1, sizeof(*element));
|
||||
sangomabc_queue_element_t *element = zap_calloc(1, sizeof(*element));
|
||||
if (!element) {
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
|
@ -1588,7 +1588,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_sangoma_boost_configure_span)
|
|||
}
|
||||
}
|
||||
|
||||
sangoma_boost_data = calloc(1, sizeof(*sangoma_boost_data));
|
||||
sangoma_boost_data = zap_calloc(1, sizeof(*sangoma_boost_data));
|
||||
if (!sangoma_boost_data) {
|
||||
FAIL_CONFIG_RETURN(ZAP_FAIL);
|
||||
}
|
||||
|
|
|
@ -583,7 +583,7 @@ OZ_DECLARE(zap_status_t) zap_span_add_channel(zap_span_t *span, zap_socket_t soc
|
|||
zap_buffer_create(&new_chan->gen_dtmf_buffer, 128, 128, 0);
|
||||
new_chan->variable_hash = create_hashtable(16, zap_hash_hashfromstring, zap_hash_equalkeys);
|
||||
|
||||
new_chan->dtmf_hangup_buf = calloc (span->dtmf_hangup_len + 1, sizeof (char));
|
||||
new_chan->dtmf_hangup_buf = zap_calloc (span->dtmf_hangup_len + 1, sizeof (char));
|
||||
|
||||
zap_set_flag(new_chan, ZAP_CHANNEL_CONFIGURED | ZAP_CHANNEL_READY);
|
||||
*chan = new_chan;
|
||||
|
|
|
@ -54,12 +54,12 @@ OZ_DECLARE(zap_status_t) zap_queue_create(zap_queue_t **outqueue, zap_size_t siz
|
|||
zap_assert(size > 0, ZAP_FAIL, "Queue size is not bigger than 0\n");
|
||||
|
||||
*outqueue = NULL;
|
||||
zap_queue_t *queue = calloc(1, sizeof(*queue));
|
||||
zap_queue_t *queue = zap_calloc(1, sizeof(*queue));
|
||||
if (!queue) {
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
|
||||
queue->elements = calloc(1, (sizeof(void*)*size));
|
||||
queue->elements = zap_calloc(1, (sizeof(void*)*size));
|
||||
if (!queue->elements) {
|
||||
goto failed;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue