Change in libosmocore[master]: vty: cosmetic: fix missing curly braces in vty_describe_command()

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
Mon Sep 21 16:55:21 UTC 2020


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


Change subject: vty: cosmetic: fix missing curly braces in vty_describe_command()
......................................................................

vty: cosmetic: fix missing curly braces in vty_describe_command()

Change-Id: I1585ee70a3db77aa8737f9463c4d0665f4e90d90
---
M src/vty/vty.c
1 file changed, 4 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/20237/1

diff --git a/src/vty/vty.c b/src/vty/vty.c
index 2b131a4..6e7bdcb 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -1153,7 +1153,7 @@
 
 	/* 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 @@
 			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 @@
 				desc->str ? desc->str : "", VTY_NEWLINE);
 #endif				/* 0 */
 		}
+	}
 
 	if ((desc = desc_cr)) {
 		if (!desc->str)

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1585ee70a3db77aa8737f9463c4d0665f4e90d90
Gerrit-Change-Number: 20237
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/20200921/8b4686cb/attachment.htm>


More information about the gerrit-log mailing list