summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2010-01-15 18:21:50 +0000
committerSean Bright <sean@malleable.com>2010-01-15 18:21:50 +0000
commite612d87695ec794059dfe3fc0021bd11a331713d (patch)
treeede1629dadd9e525779f3da8f54510a9dd1ea081 /apps
parent89413e9ae2d8f0105758c5007313d60c540a8253 (diff)
Convert a few places to use ast_calloc_with_stringfields where applicable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_jack.c6
-rw-r--r--apps/app_meetme.c10
2 files changed, 3 insertions, 13 deletions
diff --git a/apps/app_jack.c b/apps/app_jack.c
index e8f717b3f..2f263b693 100644
--- a/apps/app_jack.c
+++ b/apps/app_jack.c
@@ -676,11 +676,7 @@ static struct jack_data *jack_data_alloc(void)
{
struct jack_data *jack_data;
- if (!(jack_data = ast_calloc(1, sizeof(*jack_data))))
- return NULL;
-
- if (ast_string_field_init(jack_data, 32)) {
- ast_free(jack_data);
+ if (!(jack_data = ast_calloc_with_stringfields(1, struct jack_data, 32))) {
return NULL;
}
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index d340ae1b3..17fec5f0c 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -6166,10 +6166,7 @@ static int sla_build_trunk(struct ast_config *cfg, const char *cat)
return -1;
}
- if (!(trunk = ast_calloc(1, sizeof(*trunk))))
- return -1;
- if (ast_string_field_init(trunk, 32)) {
- ast_free(trunk);
+ if (!(trunk = ast_calloc_with_stringfields(1, struct sla_trunk, 32))) {
return -1;
}
@@ -6295,10 +6292,7 @@ static int sla_build_station(struct ast_config *cfg, const char *cat)
return -1;
}
- if (!(station = ast_calloc(1, sizeof(*station))))
- return -1;
- if (ast_string_field_init(station, 32)) {
- ast_free(station);
+ if (!(station = ast_calloc_with_stringfields(1, struct sla_station, 32))) {
return -1;
}