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)
Sat, Dec 14, 3:39 PM
Unknown Object (File)
Sat, Dec 14, 12:54 AM
Unknown Object (File)
Tue, Dec 10, 5:33 AM
Unknown Object (File)
Nov 19 2024, 2:40 AM
Unknown Object (File)
Nov 18 2024, 2:14 PM
Unknown Object (File)
Nov 18 2024, 10:18 AM
Unknown Object (File)
Nov 18 2024, 7:58 AM
Unknown Object (File)
Nov 2 2024, 5:44 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