aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-08-18 18:40:16 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-08-18 18:40:22 +0700
commit478dd1b3300b71b4c099dfb53e7d671e527335f5 (patch)
treea90e09b77f8d6bb9de2680cef6998cafb9c4d033 /src
parentb0bbd72b2e701c05e23a461232841166cee48869 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/vty/command.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vty/command.c b/src/vty/command.c
index d5e9d274..722b3e05 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -632,13 +632,13 @@ static int vty_dump_element(struct cmd_element *cmd, print_func_t print_func, vo
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;