diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:04:26 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:04:26 +0200 |
commit | 4e3afb147210d0e98de5ad158062d1b79ac026fb (patch) | |
tree | 4e04b743fffb14c55801fb2d0a2d8c8a50afacd8 /zebra/zebra_routemap.c | |
parent | lib: lib-warnings.patch (diff) | |
download | frr-4e3afb147210d0e98de5ad158062d1b79ac026fb.tar.xz frr-4e3afb147210d0e98de5ad158062d1b79ac026fb.zip |
zebra: zebra-warnings.patch
Remove compiled warnings for the zebra directory
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
Diffstat (limited to 'zebra/zebra_routemap.c')
-rw-r--r-- | zebra/zebra_routemap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 8ac08960a..ec8ee45cd 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -87,7 +87,7 @@ zebra_route_match_delete (struct vty *vty, struct route_map_index *index, route_map_event_t type) { int ret; - char *dep_name = (char *)arg; + char *dep_name = NULL; const char *tmpstr; char *rmap_name = NULL; @@ -99,6 +99,10 @@ zebra_route_match_delete (struct vty *vty, struct route_map_index *index, if ((tmpstr = route_map_get_match_arg(index, command)) != NULL) dep_name = XSTRDUP(MTYPE_ROUTE_MAP_RULE, tmpstr); } + else + { + dep_name = XSTRDUP(MTYPE_ROUTE_MAP_RULE, arg); + } rmap_name = XSTRDUP(MTYPE_ROUTE_MAP_NAME, index->map->name); } @@ -119,7 +123,7 @@ zebra_route_match_delete (struct vty *vty, struct route_map_index *index, if (type != RMAP_EVENT_MATCH_DELETED && dep_name) route_map_upd8_dependency(type, dep_name, rmap_name); - if (arg == NULL && dep_name) + if (dep_name) XFREE(MTYPE_ROUTE_MAP_RULE, dep_name); if (rmap_name) XFREE(MTYPE_ROUTE_MAP_NAME, rmap_name); |