aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-21 23:34:12 +0700
committerlaforge <laforge@osmocom.org>2020-09-22 19:29:28 +0000
commit349d3480a6e76615824532d9845520146f03c897 (patch)
tree5cddb9271e4214000209186148dc7aedf7716491 /src/vty
parentf909d336c3fe620caca1f9aa2ccb98c4b2d0f271 (diff)
vty: cosmetic: fix missing curly braces in vty_describe_command()
Diffstat (limited to 'src/vty')
-rw-r--r--src/vty/vty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vty/vty.c b/src/vty/vty.c
index 2b131a4e..6e7bdcb3 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -1153,7 +1153,7 @@ static void vty_describe_command(struct vty *vty)
/* Get width of command string. */
cmd_width = 0;
- for (i = 0; i < vector_active(describe); i++)
+ for (i = 0; i < vector_active(describe); i++) {
if ((desc = vector_slot(describe, i)) != NULL) {
unsigned int len;
@@ -1167,12 +1167,13 @@ static void vty_describe_command(struct vty *vty)
if (cmd_width < len)
cmd_width = len;
}
+ }
/* Get width of description string. */
desc_width = vty->width - (cmd_width + 6);
/* Print out description. */
- for (i = 0; i < vector_active(describe); i++)
+ for (i = 0; i < vector_active(describe); i++) {
if ((desc = vector_slot(describe, i)) != NULL) {
if (desc->cmd[0] == '\0')
continue;
@@ -1201,6 +1202,7 @@ static void vty_describe_command(struct vty *vty)
desc->str ? desc->str : "", VTY_NEWLINE);
#endif /* 0 */
}
+ }
if ((desc = desc_cr)) {
if (!desc->str)