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/bgp_dump.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/bgp_dump.c')
-rw-r--r-- | bgpd/bgp_dump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index bf26fddf9..31f9141a8 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -753,7 +753,7 @@ DEFUN (dump_bgp_all, const struct bgp_dump_type_map *map = NULL; for (map = bgp_dump_type_map; map->str; map++) - if (strcmp(argv[idx_dump_routes]->arg, map->str) == 0) + if (strmatch(argv[idx_dump_routes]->text, map->str)) bgp_dump_type = map->type; switch (bgp_dump_type) @@ -800,7 +800,7 @@ DEFUN (no_dump_bgp_all, struct bgp_dump *bgp_dump_struct = NULL; for (map = bgp_dump_type_map; map->str; map++) - if (strcmp(argv[idx_dump_routes]->arg, map->str) == 0) + if (strmatch(argv[idx_dump_routes]->text, map->str)) bgp_dump_type = map->type; switch (bgp_dump_type) |