From eaea30c77486fedc1141c249ae2bee0770516051 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 1 Jun 2012 21:57:27 +0200 Subject: use talloc_zero_size instead of talloc_size --- src/gsmd/timer.c | 2 +- src/gsmd/usock.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/gsmd/timer.c b/src/gsmd/timer.c index 648676f..31901c7 100644 --- a/src/gsmd/timer.c +++ b/src/gsmd/timer.c @@ -160,7 +160,7 @@ struct gsmd_timer *gsmd_timer_alloc(void) { struct gsmd_timer *tmr; - tmr = talloc_size(__tmr_ctx, sizeof(*tmr)); + tmr = talloc_zero_size(__tmr_ctx, sizeof(*tmr)); return tmr; } diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c index aa2c7b5..5e5b5c3 100644 --- a/src/gsmd/usock.c +++ b/src/gsmd/usock.c @@ -47,7 +47,7 @@ static void *__ucmd_ctx, *__gu_ctx; struct gsmd_ucmd *ucmd_alloc(int extra_size) { - return talloc_size(__ucmd_ctx, + return talloc_zero_size(__ucmd_ctx, sizeof(struct gsmd_ucmd) + extra_size); } @@ -986,7 +986,7 @@ static int network_opers_parse(const char *str, struct gsmd_msg_oper **out) str++; } - *out = talloc_size(__gu_ctx, sizeof(struct gsmd_msg_oper) * (len + 1)); + *out = talloc_zero_size(__gu_ctx, sizeof(struct gsmd_msg_oper) * (len + 1)); if (!out) return -ENOMEM; @@ -1120,7 +1120,7 @@ static int network_ownnumbers_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp) else len = 0; - num = talloc_size(__gu_ctx, sizeof(*num) + len + 1); + num = talloc_zero_size(__gu_ctx, sizeof(*num) + len + 1); if (len) ret = sscanf(resp, "+CNUM: \"%[^\"]\",\"%32[^\"]\",%i,%*i,%i,", num->name, num->addr.number, -- cgit v1.2.3