From 2fec17cd047defee33e5a469b0c5bf9e2853a8f9 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 30 Sep 2020 18:22:33 -0400 Subject: [PATCH] lib: fix zapi_nexthop_update_decode error rc This function returns true on success and false otherwise. Returning -1 on error is equivalent to returning true. Signed-off-by: Quentin Young --- lib/zclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zclient.c b/lib/zclient.c index b7d240b4e8..914b02749e 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -1765,7 +1765,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;