Change in libosmocore[master]: vty/command.c: cosmetic: add missing curly brackets

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri May 31 20:40:17 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14306 )

Change subject: vty/command.c: cosmetic: add missing curly brackets
......................................................................

vty/command.c: cosmetic: add missing curly brackets

Otherwise it's a bit hard to read the code.

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

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/vty/command.c b/src/vty/command.c
index de084ab..87f2abc 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -2226,7 +2226,7 @@
 	/* 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 @@
 				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 @@
 				incomplete_count++;
 			}
 		}
+	}
 
 	/* Finish of using cmd_vector. */
 	vector_free(cmd_vector);

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I807ec71cfb67976251be844cdb2d2776b1837438
Gerrit-Change-Number: 14306
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190531/cec626e5/attachment.htm>


More information about the gerrit-log mailing list