Change in ...osmo-iuh[master]: iu_client: sccp_sap_up: set rc early

lynxis lazus gerrit-no-reply at lists.osmocom.org
Tue Aug 13 15:51:04 UTC 2019


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/15179


Change subject: iu_client: sccp_sap_up: set rc early
......................................................................

iu_client: sccp_sap_up: set rc early

Allows to skip assignment later.

Change-Id: Idd803774612719df144bef569fb734289aa31282
---
M src/iu_client.c
1 file changed, 1 insertion(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/79/15179/1

diff --git a/src/iu_client.c b/src/iu_client.c
index 9addd1c..f8333af 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -765,7 +765,7 @@
 	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 = {};
 
@@ -774,7 +774,6 @@
 	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*/
@@ -821,7 +820,6 @@
 		rc = ranap_cn_rx_cl(cn_ranap_handle_cl, prim, msgb_l2(oph->msg), msgb_l2len(oph->msg));
 		break;
 	default:
-		rc = -1;
 		break;
 	}
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/15179
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Idd803774612719df144bef569fb734289aa31282
Gerrit-Change-Number: 15179
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190813/082f8699/attachment.html>


More information about the gerrit-log mailing list