lib: argv update for thread.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2016-09-22 20:32:34 +00:00
parent 97e5b7c0b3
commit 1bf1b05af9

View File

@ -302,12 +302,12 @@ DEFUN (show_thread_cpu,
int i = 0;
thread_type filter = (thread_type) -1U;
if (argc > 0)
if (argc > 3)
{
filter = 0;
while (argv[0][i] != '\0')
while (argv[3]->arg[i] != '\0')
{
switch ( argv[0][i] )
switch ( argv[3]->arg[i] )
{
case 'r':
case 'R':
@ -342,7 +342,7 @@ DEFUN (show_thread_cpu,
{
vty_out(vty, "Invalid filter \"%s\" specified,"
" must contain at least one of 'RWTEXB'%s",
argv[0], VTY_NEWLINE);
argv[3]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
}
@ -384,12 +384,12 @@ DEFUN (clear_thread_cpu,
int i = 0;
thread_type filter = (thread_type) -1U;
if (argc > 0)
if (argc > 3)
{
filter = 0;
while (argv[0][i] != '\0')
while (argv[3]->arg[i] != '\0')
{
switch ( argv[0][i] )
switch ( argv[3]->arg[i] )
{
case 'r':
case 'R':
@ -424,7 +424,7 @@ DEFUN (clear_thread_cpu,
{
vty_out(vty, "Invalid filter \"%s\" specified,"
" must contain at least one of 'RWTEXB'%s",
argv[0], VTY_NEWLINE);
argv[3]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
}