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, Sep 24, 11:28 PM
Unknown Object (File)
Tue, Sep 24, 4:22 PM
Unknown Object (File)
Tue, Sep 24, 8:36 AM
Unknown Object (File)
Mon, Sep 23, 10:29 PM
Unknown Object (File)
Mon, Sep 23, 8:18 AM
Unknown Object (File)
Sat, Sep 21, 9:10 PM
Unknown Object (File)
Tue, Sep 17, 6:13 PM
Unknown Object (File)
Tue, Sep 17, 4: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 Skipped
Unit
Tests Skipped
Build Status
Buildable 48617
Build 45503: arc lint + arc unit