Page MenuHomeFreeBSD

if_ovpn: cleanup offsetof() use
ClosedPublic

Authored by kp on Dec 5 2022, 4:31 PM.
Tags
None
Referenced Files
F105299055: D37607.id114129.diff
Sat, Dec 14, 3:39 PM
F105247593: D37607.diff
Sat, Dec 14, 12:54 AM
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

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 Skipped
Unit
Tests Skipped
Build Status
Buildable 48617
Build 45503: arc lint + arc unit