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)
Fri, Sep 4, 1:48 AM
Unknown Object (File)
Wed, Sep 2, 9:02 AM
Unknown Object (File)
Thu, Aug 27, 4:24 AM
Unknown Object (File)
Wed, Aug 26, 8:57 PM
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
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