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
F174168457: D55702.diff
Thu, Oct 1, 2:37 AM
Unknown Object (File)
Tue, Sep 29, 4:35 PM
Unknown Object (File)
Mon, Sep 21, 2:03 AM
Unknown Object (File)
Sat, Sep 19, 8:43 PM
Unknown Object (File)
Wed, Sep 9, 6:08 PM
Unknown Object (File)
Tue, Sep 8, 12:14 PM
Unknown Object (File)
Mon, Sep 7, 8:54 AM
Unknown Object (File)
Mon, Sep 7, 4:27 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