From 6ab87ec483e9578823cbc30458f49ab07f51acf8 Mon Sep 17 00:00:00 2001 From: "Alexander V. Chernikov" Date: Fri, 2 Dec 2022 22:20:42 +0000 Subject: [PATCH] netlink: fix non-multipath build --- sys/netlink/route/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/route/route.c b/sys/netlink/route/route.c index 78949a643227..07735cd9d5bc 100644 --- a/sys/netlink/route/route.c +++ b/sys/netlink/route/route.c @@ -747,13 +747,13 @@ create_nexthop_from_attrs(struct nl_parsed_route *attrs, struct nl_pstate *npt, int *perror) { struct nhop_object *nh = NULL; + int error = 0; if (attrs->rta_multipath != NULL) { #ifdef ROUTE_MPATH /* Multipath w/o explicit nexthops */ int num_nhops = attrs->rta_multipath->num_nhops; struct weightened_nhop *wn = npt_alloc(npt, sizeof(*wn) * num_nhops); - int error = 0; for (int i = 0; i < num_nhops; i++) { struct rta_mpath_nh *mpnh = &attrs->rta_multipath->nhops[i];