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 29, 2:01 AM
Unknown Object (File)
Tue, Sep 29, 1:55 AM
Unknown Object (File)
Tue, Sep 29, 1:10 AM
Unknown Object (File)
Sat, Sep 26, 1:37 PM
Unknown Object (File)
Wed, Sep 16, 5:39 PM
Unknown Object (File)
Sun, Sep 13, 5:39 AM
Unknown Object (File)
Sat, Sep 12, 3:13 PM
Unknown Object (File)
Fri, Sep 11, 6:12 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