diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-05-25 20:31:07 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-06-06 16:16:12 +0000 |
| commit | 0a334343d14ee8c49f561e7e3c8def1dda93e8db (patch) | |
| tree | 6a9e3a19019b7f7f4e845739d4f8d36223837389 /lib/command.c | |
| parent | 2cddf2fff7394b5a61f9bf3f8fd0b7887b8c5dfa (diff) | |
*: style for | support
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/command.c b/lib/command.c index c04360f28e..ad0479dc9d 100644 --- a/lib/command.c +++ b/lib/command.c @@ -285,7 +285,7 @@ vector cmd_make_strvec(const char *string) if (*copy == '\0' || *copy == '!' || *copy == '#') return NULL; - vector result = frrstr_split_vec(copy, " \n\r\t"); + vector result = frrstr_split_vec(copy, "\n\r\t "); for (unsigned int i = 0; i < vector_active(result); i++) { if (strlen(vector_slot(result, i)) == 0) { @@ -1163,15 +1163,15 @@ int cmd_execute_command_strict(vector vline, struct vty *vty, * The result of any processing. */ DECLARE_HOOK(cmd_execute, - (struct vty * vty, const char *cmd_in, char **cmd_out), + (struct vty *vty, const char *cmd_in, char **cmd_out), (vty, cmd_in, cmd_out)); -DEFINE_HOOK(cmd_execute, (struct vty * vty, const char *cmd_in, char **cmd_out), +DEFINE_HOOK(cmd_execute, (struct vty *vty, const char *cmd_in, char **cmd_out), (vty, cmd_in, cmd_out)); /* Hook executed after a CLI command. */ -DECLARE_KOOH(cmd_execute_done, (struct vty * vty, const char *cmd_exec), +DECLARE_KOOH(cmd_execute_done, (struct vty *vty, const char *cmd_exec), (vty, cmd_exec)); -DEFINE_KOOH(cmd_execute_done, (struct vty * vty, const char *cmd_exec), +DEFINE_KOOH(cmd_execute_done, (struct vty *vty, const char *cmd_exec), (vty, cmd_exec)); /* @@ -1198,6 +1198,7 @@ static int handle_pipe_action(struct vty *vty, const char *cmd_in, /* the remaining text should be a regexp */ char *regexp = working; bool succ = vty_set_include(vty, regexp); + if (!succ) { vty_out(vty, "%% Bad regexp '%s'", regexp); goto fail; |
