git: 50eae683fab8 - main - route/fib_algo: Remove redundant zeroing of fd_af

From: Pouria Mousavizadeh Tehrani <pouria_at_FreeBSD.org>
Date: Tue, 22 Sep 2026 19:21:16 UTC
The branch main has been updated by pouria:

URL: https://cgit.FreeBSD.org/src/commit/?id=50eae683fab8c228606bab707295d9468f97c158

commit 50eae683fab8c228606bab707295d9468f97c158
Author:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
AuthorDate: 2026-09-22 19:05:38 +0000
Commit:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-09-22 19:19:31 +0000

    route/fib_algo: Remove redundant zeroing of fd_af
    
    fd is allocated with M_ZERO and fd_num_af never decreases.
    Therefore, no need for zeroing nhaf_count and nhaf_base here.
    
    Fixes:  633438224304 ("route/fib_algo: Fix nexthop index ...")
---
 sys/net/route/fib_algo.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index 0a949ff8b776..44a8b7ff445a 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -1884,8 +1884,6 @@ fib_ref_nhop(struct fib_data *fd, struct nhop_object *nh)
 		    ("out of nhop index spaces for %s", print_family(family)));
 		nt = &fd->fd_af[fd->fd_num_af++];
 		nt->nhaf_family = family;
-		nt->nhaf_count = 0;
-		nt->nhaf_base = 0;
 	}
 
 	idx = get_nhop_idx(nh);