git: 6ab87ec483e9 - main - netlink: fix non-multipath build

From: Alexander V. Chernikov <melifaro_at_FreeBSD.org>
Date: Fri, 02 Dec 2022 22:21:07 UTC
The branch main has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=6ab87ec483e9578823cbc30458f49ab07f51acf8

commit 6ab87ec483e9578823cbc30458f49ab07f51acf8
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2022-12-02 22:20:42 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2022-12-02 22:21:00 +0000

    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];