diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-26 20:15:19 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-27 19:46:42 +0200 |
commit | 7e045c3d4285e01a8f8b13dc7ef5034f5eafcce1 (patch) | |
tree | 8a52ba1c407c44416e7b13bf7699b9411176d8cb /bgpd/rfapi/vnc_debug.c | |
parent | Merge pull request #757 from donaldsharp/extract_sort (diff) | |
download | frr-7e045c3d4285e01a8f8b13dc7ef5034f5eafcce1.tar.xz frr-7e045c3d4285e01a8f8b13dc7ef5034f5eafcce1.zip |
*: use ->text and strmatch where appropriate
Still need to go fix all the places where we do a 1-char strncmp...
spatch follows
------------------
@asdf@
expression idx;
@@
<...
strcmp (
- argv[idx]->arg,
+ argv[idx]->text,
...)
...>
@depends on asdf@
expression idx;
@@
<...
- !strcmp (argv[idx]->text,
+ strmatch (argv[idx]->text,
...)
...>
@depends on asdf@
expression idx;
expression arg;
@@
<...
- strcmp (argv[idx]->text, arg) == 0
+ strmatch (argv[idx]->text, arg)
...>
@depends on asdf@
expression idx;
expression arg;
@@
<...
- strcmp (argv[idx]->text, arg) != 0
+ !strmatch (argv[idx]->text, arg)
...>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'bgpd/rfapi/vnc_debug.c')
-rw-r--r-- | bgpd/rfapi/vnc_debug.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/rfapi/vnc_debug.c b/bgpd/rfapi/vnc_debug.c index cc27277a7..27c81d46d 100644 --- a/bgpd/rfapi/vnc_debug.c +++ b/bgpd/rfapi/vnc_debug.c @@ -69,7 +69,7 @@ DEFUN (debug_bgp_vnc, for (i = 0; i < (sizeof(vncdebug) / sizeof(struct vnc_debug)); ++i) { - if (!strcmp(argv[3]->arg, vncdebug[i].name)) + if (strmatch(argv[3]->text, vncdebug[i].name)) { if (vty->node == CONFIG_NODE) { @@ -104,11 +104,11 @@ DEFUN (no_debug_bgp_vnc, { size_t i; - if (!strcmp(argv[0]->arg, "no")) + if (strmatch(argv[0]->text, "no")) argc--, argv++; for (i = 0; i < (sizeof(vncdebug) / sizeof(struct vnc_debug)); ++i) { - if (!strcmp(argv[3]->arg, vncdebug[i].name)) + if (strmatch(argv[3]->text, vncdebug[i].name)) { if (vty->node == CONFIG_NODE) { |