From f3d2328564ee7084badb8d1d934c2912b4abc4a8 Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Sun, 15 Nov 2009 03:35:01 +0000 Subject: [PATCH] replaced calloc calls for zap_calloc git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@863 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/freetdm/src/libteletone_generate.c | 2 +- .../src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c | 4 ++-- libs/freetdm/src/zap_io.c | 2 +- libs/freetdm/src/zap_queue.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/freetdm/src/libteletone_generate.c b/libs/freetdm/src/libteletone_generate.c index d0ae2b01e3..bb41224c9a 100644 --- a/libs/freetdm/src/libteletone_generate.c +++ b/libs/freetdm/src/libteletone_generate.c @@ -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; diff --git a/libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c b/libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c index c1f7f74588..5aafbf3734 100644 --- a/libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c +++ b/libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c @@ -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); } diff --git a/libs/freetdm/src/zap_io.c b/libs/freetdm/src/zap_io.c index 4a20acf65f..d0a6aaf69d 100644 --- a/libs/freetdm/src/zap_io.c +++ b/libs/freetdm/src/zap_io.c @@ -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; diff --git a/libs/freetdm/src/zap_queue.c b/libs/freetdm/src/zap_queue.c index 93fcd76f11..7392c78117 100644 --- a/libs/freetdm/src/zap_queue.c +++ b/libs/freetdm/src/zap_queue.c @@ -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; }