diff options
| author | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-09-30 00:16:31 +0000 |
|---|---|---|
| committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-09-30 00:16:31 +0000 |
| commit | 58749582a9a2c5930d907d88a3ad0d0c5c24f627 (patch) | |
| tree | ca4b5aed981645901812b40478bb0573e0034230 /lib/command.c | |
| parent | d8bd2affd3ccc2ab05c71af19beae39cb9c4ce9f (diff) | |
all: scrubbed some argc CHECK MEs
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/lib/command.c b/lib/command.c index 4be178e122..95d69cdbf6 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1016,7 +1016,6 @@ DEFUN (config_quit, "quit", "Exit current mode and down to previous mode\n") { - /* CHECK ME argc referenced below */ return config_exit (self, vty, argc, argv); } @@ -1138,7 +1137,6 @@ DEFUN (config_write, "Write configuration currently in memory\n" "Write configuration to terminal\n") { - /* CHECK ME argc referenced below */ int idx_type = 1; unsigned int i; int fd; @@ -1284,7 +1282,6 @@ DEFUN (show_running_config, SHOW_STR "running configuration (same as write terminal/memory)\n") { - /* CHECK ME argc referenced below */ return config_write (self, vty, argc, argv); } @@ -1296,7 +1293,6 @@ DEFUN (copy_runningconf_startupconf, "Copy running config to... \n" "Copy running config to startup config (same as write file)\n") { - /* CHECK ME argc referenced below */ return config_write (self, vty, argc, argv); } /** -- **/ @@ -1378,7 +1374,6 @@ DEFUN (config_password, "Specifies a HIDDEN password will follow\n" "The password string\n") { - /* CHECK ME argc referenced below */ int idx_8 = 1; int idx_word = 2; if (argc == 3) // '8' was specified @@ -1425,9 +1420,9 @@ DEFUN (config_enable_password, "dummy string \n" "The HIDDEN 'enable' password string\n") { - /* CHECK ME argc referenced below */ int idx_8 = 2; int idx_word = 3; + /* Crypt type is specified. */ if (argc == 4) { @@ -1618,7 +1613,7 @@ DEFUN_HIDDEN (do_echo, { char *message; - vty_out (vty, "%s%s", ((message = argv_concat (argv, argc, 0)) ? message : ""), + vty_out (vty, "%s%s", ((message = argv_concat (argv, argc, 1)) ? message : ""), VTY_NEWLINE); if (message) XFREE(MTYPE_TMP, message); @@ -1632,15 +1627,15 @@ DEFUN (config_logmsg, LOG_LEVEL_DESC "The message to send\n") { - /* CHECK ME argc referenced below */ int idx_log_level = 1; + int idx_message = 2; int level; char *message; if ((level = level_match(argv[idx_log_level]->arg)) == ZLOG_DISABLED) return CMD_ERR_NO_MATCH; - zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : "")); + zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, idx_message)) ? message : "")); if (message) XFREE(MTYPE_TMP, message); return CMD_SUCCESS; @@ -1706,9 +1701,9 @@ DEFUN (config_log_stdout, "Set stdout logging level\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_log_level = 2; - if (argc == 2) + + if (argc == idx_log_level) { zlog_set_level (NULL, ZLOG_DEST_STDOUT, zlog_default->default_lvl); return CMD_SUCCESS; @@ -1740,9 +1735,9 @@ DEFUN (config_log_monitor, "Set terminal line (monitor) logging level\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_log_level = 2; - if (argc == 2) + + if (argc == idx_log_level) { zlog_set_level (NULL, ZLOG_DEST_MONITOR, zlog_default->default_lvl); return CMD_SUCCESS; @@ -1829,7 +1824,6 @@ DEFUN (config_log_file, "Logging filename\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_filename = 2; int idx_log_levels = 3; if (argc == 4) @@ -1870,7 +1864,6 @@ DEFUN (config_log_syslog, "Set syslog logging level\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_log_levels = 2; if (argc == 3) { |
