From: deraadt Date: Tue, 22 Feb 2022 17:05:51 +0000 (+0000) Subject: sysctl already passed the commandname as a 24-byte string KI_MAXCOMLEN X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f862925e1a6dc8f203a1b6d53c59ff4ccd43206d;p=openbsd sysctl already passed the commandname as a 24-byte string KI_MAXCOMLEN because it was padded. Define it in terms of _MAXCOMLEN from syslimits.h ok millert --- diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 5a47934ac82..b29c62c2b21 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.h,v 1.225 2022/02/22 03:34:51 deraadt Exp $ */ +/* $OpenBSD: sysctl.h,v 1.226 2022/02/22 17:05:51 deraadt Exp $ */ /* $NetBSD: sysctl.h,v 1.16 1996/04/09 20:55:36 cgd Exp $ */ /* @@ -38,6 +38,7 @@ #ifndef _SYS_SYSCTL_H_ #define _SYS_SYSCTL_H_ +#include #include /* @@ -355,7 +356,7 @@ struct ctlname { * binary compatibility can be preserved. */ #define KI_NGROUPS 16 -#define KI_MAXCOMLEN 24 /* extra for 8 byte alignment */ +#define KI_MAXCOMLEN _MAXCOMLEN /* includes NUL */ #define KI_WMESGLEN 8 #define KI_MAXLOGNAME 32 #define KI_EMULNAMELEN 8