Page MenuHomeFreeBSD

if_ovpn: cleanup offsetof() use
ClosedPublic

Authored by kp on Dec 5 2022, 4:31 PM.
Tags
None
Referenced Files
F134336126: D37607.id.diff
Sat, Nov 1, 12:21 PM
F134328089: D37607.id113840.diff
Sat, Nov 1, 10:56 AM
F134297468: D37607.id.diff
Sat, Nov 1, 5:37 AM
Unknown Object (File)
Thu, Oct 16, 3:11 AM
Unknown Object (File)
Sat, Oct 11, 2:22 PM
Unknown Object (File)
Sat, Oct 11, 2:22 PM
Unknown Object (File)
Sat, Oct 11, 2:22 PM
Unknown Object (File)
Sat, Oct 11, 6:01 AM

Details

Summary

Move the use of the `offsetof(struct ovpn_counters, fieldname) /
sizeof(uint64_t)` construct into a macro.
This removes a fair bit of code duplication and should make things a
little easier to read.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 48617
Build 45503: arc lint + arc unit