Commit e834166
macintosh: declare ctl_table as const
Since commit 7abc9b5 ("sysctl: allow registration of const struct
ctl_table"), the sysctl registration API allows struct ctl_table variables
to be placed into read-only memory.
mac_hid_files is registered as a sysctl table and should be treated as
read-only. By declaring the mac_hid_files structure as const, we ensure
that it cannot be accidentally modified. This change improves safety.
Suggested-by: Thomas Weißschuh <[email protected]>
Suggested-by: Ricardo B. Marliere <[email protected]>
Reviewed-by: Ricardo B. Marliere <[email protected]>
Signed-off-by: Luis Felipe Hernandez <[email protected]>
Signed-off-by: Madhavan Srinivasan <[email protected]>
Link: https://patch.msgid.link/[email protected]1 parent 65f5038 commit e834166
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
0 commit comments