Change in osmo-bts[master]: rsl: Reduce scope of variable
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/29036 ) Change subject: rsl: Reduce scope of variable ...................................................................... rsl: Reduce scope of variable The function is long/complex enough, so having one extra struct in_addr declared the function top only used in one specific small path to print the variable is unnecesary. Let's move it to the conditional path where it is used to print the ip address. Change-Id: I4c16bbca6a6779537517b6b196828b47eddaa516 --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/common/rsl.c b/src/common/rsl.c index 8cdb662..413c28d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2702,7 +2702,6 @@ int rc, inc_ip_port = 0; char *name; struct in_addr ia; - struct in_addr addr; if (dch->c.msg_type == RSL_MT_IPAC_CRCX) name = "CRCX"; @@ -2721,6 +2720,7 @@ LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "IPAC_%s: ", name); if (TLVP_PRES_LEN(&tp, RSL_IE_IPAC_REMOTE_IP, 4)) { + struct in_addr addr; connect_ip = tlvp_val32_unal(&tp, RSL_IE_IPAC_REMOTE_IP); addr.s_addr = connect_ip; LOGPC(DRSL, LOGL_DEBUG, "connect_ip=%s ", inet_ntoa(addr)); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4c16bbca6a6779537517b6b196828b47eddaa516 Gerrit-Change-Number: 29036 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-MessageType: merged
participants (1)
-
laforge