From: Quentin Young Date: Thu, 22 Sep 2016 20:32:34 +0000 (+0000) Subject: lib: argv update for thread.c X-Git-Tag: frr-3.0-branchpoint~129^2~194 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=1bf1b05af96ba0e54462e329ea5aa3195605f68a;p=matthieu%2Ffrr.git lib: argv update for thread.c Signed-off-by: Quentin Young --- diff --git a/lib/thread.c b/lib/thread.c index a26eb6bfd2..ba9a0ea2a6 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -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; } }