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)
Tue, Dec 10, 5:33 AM
Unknown Object (File)
Tue, Nov 19, 2:40 AM
Unknown Object (File)
Mon, Nov 18, 2:14 PM
Unknown Object (File)
Mon, Nov 18, 10:18 AM
Unknown Object (File)
Mon, Nov 18, 7:58 AM
Unknown Object (File)
Nov 2 2024, 5:44 PM
Unknown Object (File)
Oct 10 2024, 9:12 PM
Unknown Object (File)
Sep 30 2024, 2:31 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