[PATCH] osmo-msc[master]: sms_route_mt_sms: Don't return uninitialized variable

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Nov 14 06:09:49 UTC 2017


Review at  https://gerrit.osmocom.org/4830

sms_route_mt_sms: Don't return uninitialized variable

Wen there's no SMPP support compiled in, and routing was successful,
we shouldn't return an uninitialized value.

Change-Id: I4abbbb5ab336a7e8da08d682f396baec3b56fa3a
Fixes: Coverity CID#174176
---
M src/libmsc/gsm_04_11.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/30/4830/1

diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index 99adbf7..103c259 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -388,7 +388,8 @@
 		rc = GSM411_RP_CAUSE_MO_NUM_UNASSIGNED;
 		rate_ctr_inc(&conn->network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]);
 #endif
-	}
+	} else
+		rc = 0;
 
 	return rc;
 }

-- 
To view, visit https://gerrit.osmocom.org/4830
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4abbbb5ab336a7e8da08d682f396baec3b56fa3a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list