aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2013-07-05 15:44:12 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2013-07-08 01:22:57 +0200
commit33f7175764af20d2f71c243945090f166ea5c454 (patch)
tree2c3c0effbd5bae8c4244b42c878b1d9f1dde2eba
parentf69b8123f9507d1c854d265c4950894843fd9b85 (diff)
e1_input: fix compilation warning in e1inp_tx_ts
e1_input.c: In function 'e1inp_tx_ts': e1_input.c:620:6: warning: variable 'len' set but not used [-Wunused-but-set-variable] Fix it by performing a stricter checking on the muxed bits before transmission. Let's see if this spots some hidden bug in this code.
-rw-r--r--src/e1_input.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/e1_input.c b/src/e1_input.c
index ce715b5..e5ddaa3 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -636,6 +636,12 @@ struct msgb *e1inp_tx_ts(struct e1inp_ts *e1i_ts,
if (!msg)
return NULL;
len = subchan_mux_out(&e1i_ts->trau.mux, msg->data, 40);
+ if (len != 40) {
+ LOGP(DLMI, LOGL_ERROR,
+ "cannot transmit, failed to mux\n");
+ msgb_free(msg);
+ return NULL;
+ }
msgb_put(msg, 40);
break;
default: