aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-11-12 16:37:23 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-11-14 18:02:29 +0100
commitce4224f86c5fb33f8c7d4a8a9cbe88c42c9bdf74 (patch)
treed47f7ee52b4362770ca4b0f1a27a8f5e7f8d89b7 /src/osmo-bsc
parentad2c15da14b4aae6e80cc69a3c6d91989a4db15d (diff)
coverity: gscon_forget_lchan: squelch forward-null
conn->fi should actually never be NULL, they are allocated and discarded simultaneously. So check its null from the start and remove some conditions below, to remove the coverity warning. Related: CID 189671 Change-Id: I62354aa998832131c86535f39a29294000114adc
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r--src/osmo-bsc/bsc_subscr_conn_fsm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 0dd21d9b9..d2ca03e37 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -672,14 +672,12 @@ void gscon_forget_lchan(struct gsm_subscriber_connection *conn, struct gsm_lchan
/* Log for both lchan FSM and conn FSM to ease reading the log in case of problems */
if (detach_label) {
- if (conn->fi)
- LOGPFSML(conn->fi, LOGL_DEBUG, "conn detaches lchan %s\n",
- lchan->fi? osmo_fsm_inst_name(lchan->fi) : gsm_lchan_name(lchan));
+ LOGPFSML(conn->fi, LOGL_DEBUG, "conn detaches lchan %s\n",
+ lchan->fi? osmo_fsm_inst_name(lchan->fi) : gsm_lchan_name(lchan));
if (lchan->fi)
LOGPFSML(lchan->fi, LOGL_DEBUG, "conn %s detaches lchan (%s)\n",
- conn->fi? osmo_fsm_inst_name(conn->fi) : "(conn without FSM)",
- detach_label);
+ osmo_fsm_inst_name(conn->fi), detach_label);
}
if (conn->fi->state != ST_CLEARING