Page MenuHomeFreeBSD

kern: mac: sprinkle a bit of const correctness
ClosedPublic

Authored by kevans on Mar 7 2026, 3:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 7, 2:48 PM
Unknown Object (File)
May 27 2026, 12:47 AM
Unknown Object (File)
May 24 2026, 9:03 AM
Unknown Object (File)
May 22 2026, 12:45 PM
Unknown Object (File)
May 17 2026, 7:09 AM
Unknown Object (File)
May 15 2026, 5:22 AM
Unknown Object (File)
May 14 2026, 11:02 AM
Unknown Object (File)
May 14 2026, 1:08 AM
Subscribers

Details

Summary

mpc_name and mpc_fullname are string literals in correct usage, so they
should really be const instead.

mpc_ops aren't typically const, but the framework shouldn't be doing
anything to clobber it; thus, good to constify it as a reminder.

Switch to using a slightly more semantically correct void ** in the
fastpath bits while we're here, since we only do arithmetic on the outer
layer of pointer and compare the inner to a pointer-typed (NULL).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 71239
Build 68122: arc lint + arc unit