svn commit: r363622 - head/sys/sys
Alan Somers
asomers at FreeBSD.org
Mon Jul 27 18:57:29 UTC 2020
Author: asomers
Date: Mon Jul 27 18:57:28 2020
New Revision: 363622
URL: https://svnweb.freebsd.org/changeset/base/363622
Log:
Restrict definition of CTL_P1003_1B_MAXID to the kernel
This constant is only used to size an array within the kernel. There are
probably no legitimate uses in userland. Worse, since the kernel's array
could theoretically change size over time, any use of that symbol in
userland wouldn't be forwards compatible to new kernel versions.
Reviewed by: jhb
MFC after: Never
Differential Revision: https://reviews.freebsd.org/D25816
Modified:
head/sys/sys/sysctl.h
Modified: head/sys/sys/sysctl.h
==============================================================================
--- head/sys/sys/sysctl.h Mon Jul 27 18:46:20 2020 (r363621)
+++ head/sys/sys/sysctl.h Mon Jul 27 18:57:28 2020 (r363622)
@@ -1096,9 +1096,9 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
#define CTL_P1003_1B_SIGQUEUE_MAX 24 /* int */
#define CTL_P1003_1B_TIMER_MAX 25 /* int */
-#define CTL_P1003_1B_MAXID 26
-
#ifdef _KERNEL
+
+#define CTL_P1003_1B_MAXID 26
/*
* Declare some common oids.
More information about the svn-src-head
mailing list