git: wg: More style cleanups and minor updates to if_wg.c
Aaron LI
aly at crater.dragonflybsd.org
Thu Feb 8 00:32:33 PST 2024
commit 359ddb36f15f52006ff841b1779737b6ac042d0b
Author: Aaron LI <aly at aaronly.me>
Date: Fri Dec 29 22:42:49 2023 +0800
wg: More style cleanups and minor updates to if_wg.c
- Clean up header inclusions.
- Add 'WG_PKT_WITH_PADDING()' and 'WG_PKT_DATA_MINLEN' macros to help
simplify some code.
- Remove unnecessary assignments that are already ensured by
kmalloc(M_ZERO).
- Rename some variables for consistency.
- Use 'int' instead of 'u_int' for cpu, in consistent with 'ncpus'.
- Use 'memcmp()' instead of 'bmcp()' for consistent with other parts.
- Remove the KKASSERT() of lock assertion from 'wg_aip_remove()', as
it's quite obvious and thus unnecessary.
- Various style adjustments and cleanups.
Summary of changes:
sys/net/wg/if_wg.c | 648 +++++++++++++++++++++++++++++------------------------
1 file changed, 355 insertions(+), 293 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/359ddb36f15f52006ff841b1779737b6ac042d0b
--
DragonFly BSD source repository
More information about the Commits
mailing list