Change in osmo-msc[master]: libmsc/msc_vty.c: drop dead comparison against null

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
Thu Feb 28 10:31:22 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13018 )

Change subject: libmsc/msc_vty.c: drop dead comparison against null
......................................................................

libmsc/msc_vty.c: drop dead comparison against null

Since vsub->sgs.mme_name is allocated statically, comparing it
to null doesn't make sense - it's always != NULL.

Change-Id: Ib2933a20471ebff9dfe1d9fdddf39d177504c951
Fixes: CID#178166 Array compared against 0 (NO_EFFECT)
---
M src/libmsc/msc_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved
  Pau Espin Pedrol: Looks good to me, but someone else must approve



diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 5aa533b..2adb2a4 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -749,7 +749,7 @@
 	/* SGs related */
 	vty_out(vty, "    SGs-state: %s%s",
 		osmo_fsm_inst_state_name(vsub->sgs_fsm), VTY_NEWLINE);
-	if (vsub->sgs.mme_name && strlen(vsub->sgs.mme_name))
+	if (strlen(vsub->sgs.mme_name))
 		vty_out(vty, "    SGs-MME: %s%s", vsub->sgs.mme_name, VTY_NEWLINE);
 	else
 		vty_out(vty, "    SGs-MME: (none)%s", VTY_NEWLINE);

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2933a20471ebff9dfe1d9fdddf39d177504c951
Gerrit-Change-Number: 13018
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190228/0d18a501/attachment.htm>


More information about the gerrit-log mailing list