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/e1_config.c | |
parent | c05677b036dce4dbf59414dc15b75a5b3472ae6e (diff) |
use taloc_zero() rather than talloc() and explisit memset()
Diffstat (limited to 'openbsc/src/e1_config.c')
-rw-r--r-- | openbsc/src/e1_config.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/openbsc/src/e1_config.c b/openbsc/src/e1_config.c index abc30402f..9c9f40cff 100644 --- a/openbsc/src/e1_config.c +++ b/openbsc/src/e1_config.c @@ -25,10 +25,9 @@ int e1_config(struct gsm_bts *bts, int cardnr, int release_l2) struct e1inp_ts *sign_ts; struct e1inp_sign_link *oml_link, *rsl_link; - line = talloc(tall_bsc_ctx, struct e1inp_line); + line = talloc_zero(tall_bsc_ctx, struct e1inp_line); if (!line) return -ENOMEM; - memset(line, 0, sizeof(*line)); /* create E1 timeslots for signalling and TRAU frames */ e1inp_ts_config(&line->ts[1-1], line, E1INP_TS_TYPE_SIGN); @@ -80,10 +79,9 @@ int ia_config_connect(struct gsm_bts *bts, struct sockaddr_in *sin) struct e1inp_ts *sign_ts, *rsl_ts; struct e1inp_sign_link *oml_link, *rsl_link; - line = talloc(tall_bsc_ctx, struct e1inp_line); + line = talloc_zero(tall_bsc_ctx, struct e1inp_line); if (!line) return -ENOMEM; - memset(line, 0, sizeof(*line)); /* create E1 timeslots for signalling and TRAU frames */ e1inp_ts_config(&line->ts[1-1], line, E1INP_TS_TYPE_SIGN); |