summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorwhitespace / reindent <invalid@invalid.invalid>2017-07-17 15:26:02 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-07-17 15:26:02 -0400
commitc14777c6bfd0a446c85243d3a9835054a259c276 (patch)
tree2021f7d89a6046f81ff1f44d256ecff28282568f /lib/command.c
parentf0735da293f2aef7e09cb67c5564d69d7260db9a (diff)
*: reindent pt. 2
w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/command.c b/lib/command.c
index d97ad9db3c..d4b628ab02 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -56,19 +56,23 @@ struct host host;
/* Standard command node structures. */
static struct cmd_node auth_node = {
- AUTH_NODE, "Password: ",
+ AUTH_NODE,
+ "Password: ",
};
static struct cmd_node view_node = {
- VIEW_NODE, "%s> ",
+ VIEW_NODE,
+ "%s> ",
};
static struct cmd_node auth_enable_node = {
- AUTH_ENABLE_NODE, "Password: ",
+ AUTH_ENABLE_NODE,
+ "Password: ",
};
static struct cmd_node enable_node = {
- ENABLE_NODE, "%s# ",
+ ENABLE_NODE,
+ "%s# ",
};
static struct cmd_node config_node = {CONFIG_NODE, "%s(config)# ", 1};
@@ -649,8 +653,9 @@ void cmd_variable_complete(struct cmd_token *token, const char *arg,
for (ALL_LIST_ELEMENTS_RO(varhandlers, ln, cvh)) {
if (cvh->tokenname && strcmp(cvh->tokenname, token->text))
continue;
- if (cvh->varname && (!token->varname
- || strcmp(cvh->varname, token->varname)))
+ if (cvh->varname
+ && (!token->varname
+ || strcmp(cvh->varname, token->varname)))
continue;
cvh->completions(tmpcomps, token);
break;
@@ -1495,8 +1500,9 @@ DEFUN (config_write,
struct stat conf_stat;
// if command was 'write terminal' or 'show running-config'
- if (argc == 2 && (strmatch(argv[idx_type]->text, "terminal")
- || strmatch(argv[0]->text, "show"))) {
+ if (argc == 2
+ && (strmatch(argv[idx_type]->text, "terminal")
+ || strmatch(argv[0]->text, "show"))) {
vty_write_config(vty);
return CMD_SUCCESS;
}