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)
Sun, Jan 26, 10:52 PM
Unknown Object (File)
Dec 14 2024, 3:39 PM
Unknown Object (File)
Dec 14 2024, 12:54 AM
Unknown Object (File)
Dec 10 2024, 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

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