summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-01 00:27:22 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-06-01 02:27:16 +0700
commitf5781c9a88c675ea903445e1849bcd3a20c2c8cc (patch)
tree944c1e472b3f4cb4233d79a893e5944ac3131197 /src
parent1dc82643c549a27fb8851ba64e9a0f621f5aea00 (diff)
vty/command.c: cosmetic: add missing curly brackets
Otherwise it's a bit hard to read the code. Change-Id: I807ec71cfb67976251be844cdb2d2776b1837438
Diffstat (limited to 'src')
-rw-r--r--src/vty/command.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vty/command.c b/src/vty/command.c
index de084ab3..87f2abc2 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -2226,7 +2226,7 @@ cmd_execute_command_real(vector vline, struct vty *vty,
/* Make copy of command elements. */
cmd_vector = vector_copy(cmd_node_vector(cmdvec, vty->node));
- for (index = 0; index < vector_active(vline); index++)
+ for (index = 0; index < vector_active(vline); index++) {
if ((command = vector_slot(vline, index))) {
int ret;
@@ -2247,13 +2247,14 @@ cmd_execute_command_real(vector vline, struct vty *vty,
return CMD_ERR_NO_MATCH;
}
}
+ }
/* Check matched count. */
matched_element = NULL;
matched_count = 0;
incomplete_count = 0;
- for (i = 0; i < vector_active(cmd_vector); i++)
+ for (i = 0; i < vector_active(cmd_vector); i++) {
if ((cmd_element = vector_slot(cmd_vector, i))) {
if (match == vararg_match
|| index >= cmd_element->cmdsize) {
@@ -2266,6 +2267,7 @@ cmd_execute_command_real(vector vline, struct vty *vty,
incomplete_count++;
}
}
+ }
/* Finish of using cmd_vector. */
vector_free(cmd_vector);