Change in osmo-sip-connector[master]: mncc: Fix missing conditional clause

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Sep 3 09:32:21 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/10734


Change subject: mncc: Fix missing conditional clause
......................................................................

mncc: Fix missing conditional clause

Fixes following compilation warning:
osmo-sip-connector/src/mncc.c: In function ‘check_disc_ind’:
osmo-sip-connector/src/mncc.c:517:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if (other_leg)
  ^~

Fixes: 008915ee41900c34ec0fd8df0c9f1d7c2cbdb3b2 ("Implement Cause Mapping")

Change-Id: I5bdbc29a3f82bdc92b156c1f7df68c9503f85f8f
---
M src/mncc.c
1 file changed, 6 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/34/10734/1

diff --git a/src/mncc.c b/src/mncc.c
index f41bb51..ae60321 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -514,9 +514,10 @@
 	mncc_send(leg->conn, MNCC_REL_REQ, leg->callref);
 
 	other_leg = call_leg_other(&leg->base);
-	if (other_leg)
+	if (other_leg) {
 		other_leg->cause = data->cause.value;
 		other_leg->release_call(other_leg);
+	}
 }
 
 static void check_rel_ind(struct mncc_connection *conn, const char *buf, int rc)
@@ -533,9 +534,10 @@
 	else {
 		struct call_leg *other_leg;
 		other_leg = call_leg_other(&leg->base);
-		if (other_leg)
+		if (other_leg) {
 			other_leg->cause = data->cause.value;
 			other_leg->release_call(other_leg);
+		}
 	}
 	LOGP(DMNCC, LOGL_DEBUG, "leg(%u) was released.\n", data->callref);
 	mncc_leg_release(leg);
@@ -581,9 +583,10 @@
 
 	leg->cause = data->cause.value;
 	other_leg = call_leg_other(&leg->base);
-	if (other_leg)
+	if (other_leg) {
 		other_leg->cause = data->cause.value;
 		other_leg->release_call(other_leg);
+	}
 	LOGP(DMNCC, LOGL_DEBUG, "leg(%u) was rejected.\n", data->callref);
 	mncc_leg_release(leg);
 }

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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5bdbc29a3f82bdc92b156c1f7df68c9503f85f8f
Gerrit-Change-Number: 10734
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180903/80159c48/attachment.htm>


More information about the gerrit-log mailing list