aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/sysctl.h
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2020-07-27 18:57:28 +0000
committerAlan Somers <asomers@FreeBSD.org>2020-07-27 18:57:28 +0000
commit153f46edf4eb10428a6b06770a57480a27318264 (patch)
treea554249e4cb5572b3e0c0c28715b3a01350cf67a /sys/sys/sysctl.h
parent9b2a97806ffff94c9568be2f1ecebdf1f61bd50b (diff)
downloadsrc-153f46edf4eb10428a6b06770a57480a27318264.tar.gz
src-153f46edf4eb10428a6b06770a57480a27318264.zip
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
Notes
Notes: svn path=/head/; revision=363622
Diffstat (limited to 'sys/sys/sysctl.h')
-rw-r--r--sys/sys/sysctl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index 08fa64bed407..d0390ac42f4d 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -1096,10 +1096,10 @@ 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.
*/