Change in osmo-remsim[master]: rspro_client_fsm: Fix uninitialized return variable use

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

laforge gerrit-no-reply at lists.osmocom.org
Sun Dec 15 23:11:06 UTC 2019


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16596 )

Change subject: rspro_client_fsm: Fix uninitialized return variable use
......................................................................

rspro_client_fsm: Fix uninitialized return variable use

rspro_client_fsm.c:180:9: warning: ‘rc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  180 |  return rc;
      |         ^~

Change-Id: I64b275b06b2aa40bd7c6e1dd42afba5ffebd7b00
---
M src/rspro_client_fsm.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/rspro_client_fsm.c b/src/rspro_client_fsm.c
index 6be2fef..eea8471 100644
--- a/src/rspro_client_fsm.c
+++ b/src/rspro_client_fsm.c
@@ -162,8 +162,10 @@
 		case IPAC_PROTO_EXT_RSPRO:
 			LOGPFSM(srvc->fi, "Received RSPRO %s\n", msgb_hexdump(msg));
 			pdu = rspro_dec_msg(msg);
-			if (!pdu)
+			if (!pdu) {
+				rc = -EIO;
 				break;
+			}
 			rc = srvc->handle_rx(srvc, pdu);
 			ASN_STRUCT_FREE(asn_DEF_RsproPDU, pdu);
 			break;

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

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I64b275b06b2aa40bd7c6e1dd42afba5ffebd7b00
Gerrit-Change-Number: 16596
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191215/b894a217/attachment.htm>


More information about the gerrit-log mailing list