diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-06-01 21:57:27 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-06-01 21:57:27 +0200 |
commit | eaea30c77486fedc1141c249ae2bee0770516051 (patch) | |
tree | 211264ca3d7d4194020e0505194665c2c3bd2827 | |
parent | fe338bf5c9124cf61b5e541cc4171f549e946b1f (diff) |
use talloc_zero_size instead of talloc_size
-rw-r--r-- | src/gsmd/timer.c | 2 | ||||
-rw-r--r-- | src/gsmd/usock.c | 6 |
2 files changed, 4 insertions, 4 deletions
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, |