summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <Jafaral@users.noreply.github.com>2017-08-31 17:25:55 +0200
committerGitHub <noreply@github.com>2017-08-31 17:25:55 +0200
commit959768e8d049303c434bcb67e64d19bae65d073a (patch)
tree0387049fc8de44d6a22fafe639f58f6cfb9113f7 /ospf6d
parentMerge pull request #1077 from donaldsharp/ws (diff)
parentzebra: Coverity Code Cleanup (diff)
downloadfrr-959768e8d049303c434bcb67e64d19bae65d073a.tar.xz
frr-959768e8d049303c434bcb67e64d19bae65d073a.zip
Merge pull request #1044 from donaldsharp/combination
Coverity Cleanup of Stuff
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_asbr.c11
-rw-r--r--ospf6d/ospf6_zebra.c6
2 files changed, 6 insertions, 11 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index dd3630af1..de20fbc3a 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -985,21 +985,20 @@ static struct route_map_rule_cmd ospf6_routemap_rule_set_tag_cmd = {
static int route_map_command_status(struct vty *vty, int ret)
{
- if (!ret)
- return CMD_SUCCESS;
-
switch (ret) {
case RMAP_RULE_MISSING:
vty_out(vty, "OSPF6 Can't find rule.\n");
+ return CMD_WARNING_CONFIG_FAILED;
break;
case RMAP_COMPILE_ERROR:
vty_out(vty, "OSPF6 Argument is malformed.\n");
+ return CMD_WARNING_CONFIG_FAILED;
break;
- default:
- vty_out(vty, "OSPF6 route-map add set failed.\n");
+ case RMAP_COMPILE_SUCCESS:
break;
}
- return CMD_WARNING_CONFIG_FAILED;
+
+ return CMD_SUCCESS;
}
/* add "set metric-type" */
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index ae0838455..2372bc54b 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -231,11 +231,7 @@ static int ospf6_zebra_read_route(int command, struct zclient *zclient,
char prefixstr[PREFIX2STR_BUFFER], nexthopstr[128];
prefix2str((struct prefix *)&api.prefix, prefixstr,
sizeof(prefixstr));
- if (nexthop)
- inet_ntop(AF_INET6, nexthop, nexthopstr,
- sizeof(nexthopstr));
- else
- snprintf(nexthopstr, sizeof(nexthopstr), "::");
+ inet_ntop(AF_INET6, nexthop, nexthopstr, sizeof(nexthopstr));
zlog_debug(
"Zebra Receive route %s: %s %s nexthop %s ifindex %ld tag %" ROUTE_TAG_PRI,