Capture a repeated pattern into sysctl_securelevel_int function
authorgnezdo <gnezdo@openbsd.org>
Tue, 25 Jan 2022 04:04:40 +0000 (04:04 +0000)
committergnezdo <gnezdo@openbsd.org>
Tue, 25 Jan 2022 04:04:40 +0000 (04:04 +0000)
commit4cd1828ed9eeebb6486d183eb7e4a99fc9464b70
tree62f069f9d0e8d9d7869983bd49aee952f98a3261
parent035d4f5430cb74df720b029db6206161d62be3c7
Capture a repeated pattern into sysctl_securelevel_int function

A few variables in the kernel are only writeable before securelevel is
raised. It makes sense to handle them with less code.

OK sthen@ bluhm@
sys/arch/amd64/amd64/machdep.c
sys/arch/i386/i386/machdep.c
sys/kern/kern_sysctl.c
sys/kern/vfs_subr.c
sys/netinet/ip_input.c
sys/sys/sysctl.h