Change in libosmocore[master]: vty/command: cosmetic: swap i and j in vty_dump_element()

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

fixeria gerrit-no-reply at lists.osmocom.org
Tue Aug 18 12:20:29 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/19701 )


Change subject: vty/command: cosmetic: swap i and j in vty_dump_element()
......................................................................

vty/command: cosmetic: swap i and j in vty_dump_element()

It's more convenient to use i in the outer loop, and j, k, etc.
in the inner loops.  Otherwise it looks a bit confusing.

Change-Id: I61ef48fcf977d6a872e288571a4ff2c3dfe3184b
---
M src/vty/command.c
1 file changed, 6 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/01/19701/1

diff --git a/src/vty/command.c b/src/vty/command.c
index d5e9d27..722b3e0 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -632,13 +632,13 @@
 	print_func(data, "    <command id='%s'>%s", xml_string, newline);
 	print_func(data, "      <params>%s", newline);
 
-	int j;
-	for (j = 0; j < vector_count(cmd->strvec); ++j) {
-		vector descvec = vector_slot(cmd->strvec, j);
-		int i;
-		for (i = 0; i < vector_active(descvec); ++i) {
+	int i;
+	for (i = 0; i < vector_count(cmd->strvec); ++i) {
+		vector descvec = vector_slot(cmd->strvec, i);
+		int j;
+		for (j = 0; j < vector_active(descvec); ++j) {
 			char *xml_param, *xml_doc;
-			struct desc *desc = vector_slot(descvec, i);
+			struct desc *desc = vector_slot(descvec, j);
 			if (desc == NULL)
 				continue;
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I61ef48fcf977d6a872e288571a4ff2c3dfe3184b
Gerrit-Change-Number: 19701
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200818/f8d2d770/attachment.htm>


More information about the gerrit-log mailing list