git: net/radix: Simplify mask manipulation in rn_addmask()
Aaron LI
aly at crater.dragonflybsd.org
Fri Nov 10 01:58:13 PST 2023
commit 725ff87100dfda3d804cf93935f926c9fd3ae6a0
Author: Aaron LI <aly at aaronly.me>
Date: Sun Jun 18 21:26:18 2023 +0800
net/radix: Simplify mask manipulation in rn_addmask()
Since the max key length is known, so use an on-stack variable instead
of memory allocation for the 'addmask_key' variable. Therefore also get
rid of the 'rnh_last_zeroed' member from 'radix_node_head' struct.
Rename 'rnh_last_zeroed' to its origin 'rnh_addrsize' instead of
removing it.
Referred-to: FreeBSD
Summary of changes:
sys/net/radix.c | 42 +++++++++++++++++-------------------------
sys/net/radix.h | 3 +--
2 files changed, 18 insertions(+), 27 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/725ff87100dfda3d804cf93935f926c9fd3ae6a0
--
DragonFly BSD source repository
More information about the Commits
mailing list