Page MenuHomeFreeBSD

if_ovpn: cleanup offsetof() use
ClosedPublic

Authored by kp on Dec 5 2022, 4:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 13, 1:07 AM
Unknown Object (File)
Sun, May 3, 1:27 PM
Unknown Object (File)
Wed, Apr 29, 1:30 PM
Unknown Object (File)
Wed, Apr 29, 1:24 PM
Unknown Object (File)
Wed, Apr 29, 2:24 AM
Unknown Object (File)
Wed, Apr 29, 2:17 AM
Unknown Object (File)
Mon, Apr 27, 9:23 PM
Unknown Object (File)
Mon, Apr 27, 3:20 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