lib: look at the correct token for json

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2017-06-22 00:19:24 +00:00
parent 8ea37652c7
commit 5046f07672

View File

@ -34,7 +34,7 @@ use_json (const int argc, struct cmd_token *argv[])
if (argc == 0)
return 0;
if (argv[argc-1]->arg && strcmp(argv[argc-1]->arg, "json") == 0)
if (argv[argc-1]->arg && strmatch (argv[argc-1]->text, "json"))
return 1;
return 0;