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)
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
Unknown Object (File)
Fri, Sep 11, 6:12 PM
Unknown Object (File)
Fri, Sep 11, 6:09 PM
Unknown Object (File)
Wed, Sep 9, 10:37 PM
Unknown Object (File)
Tue, Sep 8, 3:14 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