From 478dd1b3300b71b4c099dfb53e7d671e527335f5 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 18 Aug 2020 18:40:16 +0700 Subject: 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 --- src/vty/command.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/vty') 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, " %s", xml_string, newline); print_func(data, " %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; -- cgit v1.2.3