diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-06-26 20:25:23 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-06-26 20:25:23 +0200 |
commit | 470ec29b0db526c1592f6a270652657315efddca (patch) | |
tree | 7da372db125bc09f31076a57e484165641c3d3ff /openbsc/src/subchan_demux.c | |
parent | c05677b036dce4dbf59414dc15b75a5b3472ae6e (diff) |
use taloc_zero() rather than talloc() and explisit memset()
Diffstat (limited to 'openbsc/src/subchan_demux.c')
-rw-r--r-- | openbsc/src/subchan_demux.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/openbsc/src/subchan_demux.c b/openbsc/src/subchan_demux.c index 56f3dd3f2..ccd4fadc6 100644 --- a/openbsc/src/subchan_demux.c +++ b/openbsc/src/subchan_demux.c @@ -291,12 +291,11 @@ int subchan_mux_enqueue(struct subch_mux *mx, int s_nr, const u_int8_t *data, { struct mux_subch *sch = &mx->subch[s_nr]; int list_len = llist_len(&sch->tx_queue); - struct subch_txq_entry *tqe = talloc_size(tall_tqe_ctx, - sizeof(*tqe) + len); + struct subch_txq_entry *tqe = talloc_zero_size(tall_tqe_ctx, + sizeof(*tqe) + len); if (!tqe) return -ENOMEM; - memset(tqe, 0, sizeof(*tqe)); tqe->bit_len = len; memcpy(tqe->bits, data, len); |