Neels Hofmeyr has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11742 )

Change subject: coverity: gscon_forget_lchan: squelch forward-null
......................................................................

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
---
M src/osmo-bsc/bsc_subscr_conn_fsm.c
1 file changed, 3 insertions(+), 5 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c 
b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 0dd21d9..d2ca03e 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -672,14 +672,12 @@

        /* 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

--
To view, visit https://gerrit.osmocom.org/11742
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I62354aa998832131c86535f39a29294000114adc
Gerrit-Change-Number: 11742
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>

Reply via email to