Page MenuHomeFreeBSD

if_ovpn: cleanup offsetof() use
ClosedPublic

Authored by kp on Dec 5 2022, 4:31 PM.
Tags
None
Referenced Files
F93728385: D37607.diff
Thu, Sep 12, 12:12 AM
Unknown Object (File)
Sun, Sep 8, 9:45 AM
Unknown Object (File)
Wed, Sep 4, 5:40 AM
Unknown Object (File)
Tue, Aug 27, 12:17 PM
Unknown Object (File)
Tue, Aug 27, 12:17 PM
Unknown Object (File)
Tue, Aug 27, 12:13 PM
Unknown Object (File)
Tue, Aug 27, 12:00 PM
Unknown Object (File)
Sun, Aug 18, 10:16 PM

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 Not Applicable
Unit
Tests Not Applicable