]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: unchecked return value (Coverity 1221437) 2458/head
authorpaco <paco@voltanet.io>
Fri, 15 Jun 2018 11:08:37 +0000 (13:08 +0200)
committerpaco <paco@voltanet.io>
Fri, 15 Jun 2018 11:08:37 +0000 (13:08 +0200)
Signed-off-by: F. Aragon <paco@voltanet.io>
ospf6d/ospf6_interface.c

index cc8577b94e7a2f8021106d4b8162bc43c3eae736..9178bf2f6a5776ee5e1b6db4c31d2bb9294dd278 100644 (file)
@@ -864,7 +864,6 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp)
        struct prefix *p;
        struct listnode *i;
        char strbuf[PREFIX2STR_BUFFER], drouter[32], bdrouter[32];
-       const char *updown[3] = {"down", "up", NULL};
        const char *type;
        struct timeval res, now;
        char duration[32];
@@ -881,7 +880,7 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp)
                type = "UNKNOWN";
 
        vty_out(vty, "%s is %s, type %s\n", ifp->name,
-               updown[if_is_operative(ifp)], type);
+               (if_is_operative(ifp) ? "up" : "down"), type);
        vty_out(vty, "  Interface ID: %d\n", ifp->ifindex);
 
        if (ifp->info == NULL) {