]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: fix zapi_nexthop_update_decode error rc
authorQuentin Young <qlyoung@nvidia.com>
Wed, 30 Sep 2020 22:22:33 +0000 (18:22 -0400)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 7 Oct 2020 08:01:16 +0000 (11:01 +0300)
This function returns true on success and false otherwise. Returning -1
on error is equivalent to returning true.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
lib/zclient.c

index c5016d22e2c9c922c99da49b8a16830659d158e4..fb48d4a12c8da15e049dca34242fa14a5b14f39e 100644 (file)
@@ -1689,7 +1689,7 @@ bool zapi_nexthop_update_decode(struct stream *s, struct zapi_route *nhr)
 
        for (i = 0; i < nhr->nexthop_num; i++) {
                if (zapi_nexthop_decode(s, &(nhr->nexthops[i]), 0, 0) != 0)
-                       return -1;
+                       return false;
        }
 
        return true;