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)
Wed, Aug 12, 5:18 PM
Unknown Object (File)
Wed, Aug 12, 11:34 AM
Unknown Object (File)
Wed, Aug 12, 12:31 AM
Unknown Object (File)
Tue, Aug 11, 5:24 PM
Unknown Object (File)
Mon, Aug 10, 12:15 PM
Unknown Object (File)
Mon, Aug 10, 11:10 AM
Unknown Object (File)
Mon, Aug 10, 8:06 AM
Unknown Object (File)
Sun, Aug 9, 1:21 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 Not Applicable
Unit
Tests Not Applicable