aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-08-13 17:13:59 +0200
committerAlexander Couzens <lynxis@fe80.eu>2019-09-03 16:42:06 +0200
commit80307924f16d89d8d86fe9c4692d4f565174bacd (patch)
treefed60423aaf033b6d73c7301ffda77a6ebe22d54
parentdab16ff3f5467e7e15952a835441e9204ac95702 (diff)
iu_client: sccp_sap_up: set rc early
Allows to skip assignment later. Change-Id: Idd803774612719df144bef569fb734289aa31282
-rw-r--r--src/iu_client.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/iu_client.c b/src/iu_client.c
index 92d25f5..b5f3557 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -764,7 +764,7 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu)
struct osmo_sccp_user *scu = _scu;
struct osmo_scu_prim *prim = (struct osmo_scu_prim *) oph;
struct osmo_prim_hdr *resp = NULL;
- int rc;
+ int rc = -1;
struct ranap_ue_conn_ctx *ue;
struct new_ue_conn_ctx new_ctx = {};
@@ -773,7 +773,6 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu)
switch (OSMO_PRIM_HDR(oph)) {
case OSMO_PRIM(OSMO_SCU_PRIM_N_CONNECT, PRIM_OP_CONFIRM):
/* confirmation of outbound connection */
- rc = -1;
break;
case OSMO_PRIM(OSMO_SCU_PRIM_N_CONNECT, PRIM_OP_INDICATION):
/* indication of new inbound connection request*/
@@ -814,7 +813,6 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu)
rc = ranap_cn_rx_cl(cn_ranap_handle_cl, prim, msgb_l2(oph->msg), msgb_l2len(oph->msg));
break;
default:
- rc = -1;
break;
}