Change in osmo-msc[master]: libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty()

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 May 16 08:48:52 UTC 2019


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

Change subject: libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty()
......................................................................

libmsc/msc_vty.c: use llist_count() in subscr_dump_full_vty()

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

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 8cce7a0..5c58221 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -742,8 +742,6 @@
 static void subscr_dump_full_vty(struct vty *vty, struct vlr_subscr *vsub)
 {
 	struct gsm_trans *trans;
-	int reqs;
-	struct llist_head *entry;
 	char buf[128];
 
 	if (strlen(vsub->name))
@@ -803,11 +801,10 @@
 			VTY_NEWLINE);
 	}
 
-	reqs = 0;
-	llist_for_each(entry, &vsub->cs.requests)
-		reqs += 1;
 	vty_out(vty, "    Paging: %s paging for %d requests%s",
-		vsub->cs.is_paging ? "is" : "not", reqs, VTY_NEWLINE);
+		vsub->cs.is_paging ? "is" : "not",
+		llist_count(&vsub->cs.requests),
+		VTY_NEWLINE);
 
 	/* SGs related */
 	vty_out(vty, "    SGs-state: %s%s",

-- 
To view, visit https://gerrit.osmocom.org/14063
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: I9e4814d2b2da7d4e75da074e138f423af850ed49
Gerrit-Change-Number: 14063
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190516/fbb3538e/attachment.htm>


More information about the gerrit-log mailing list