Page MenuHomeFreeBSD

if_ovpn: cleanup offsetof() use
ClosedPublic

Authored by kp on Dec 5 2022, 4:31 PM.
Tags
None
Referenced Files
F137485679: D37607.id114129.diff
Sun, Nov 23, 9:56 PM
F137485566: D37607.id.diff
Sun, Nov 23, 9:54 PM
F137485047: D37607.id113840.diff
Sun, Nov 23, 9:48 PM
F137484969: D37607.diff
Sun, Nov 23, 9:48 PM
Unknown Object (File)
Sun, Nov 23, 4:21 AM
Unknown Object (File)
Tue, Nov 18, 8:36 PM
Unknown Object (File)
Thu, Nov 13, 4:27 AM
Unknown Object (File)
Sun, Nov 2, 7:02 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