summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2022-02-22 17:04:30 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2022-02-22 17:04:30 +0000
commitd2ed23aa9f689398be95b586a77e107d2cd80f86 (patch)
tree73cbc524e7ee8889346914579bfd8f83c3e8c2b8
parent08c3ff0544bdd127cb3f89fb9f00ae99e3cfca69 (diff)
Define MAXCOMLEN in terms of _MAXCOMLEN (-1, because MAXCOMLEN does not
have the terminating NUL). In the near future, fewer programs will use this yucky non-string, some kernel:userland interfaces will to change to pass a proper string. ok millert
-rw-r--r--sys/sys/param.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 37d155698e7..e22d7f6b26c 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.136 2022/02/20 17:11:05 deraadt Exp $ */
+/* $OpenBSD: param.h,v 1.137 2022/02/22 17:04:29 deraadt Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -59,7 +59,7 @@
*/
#include <sys/syslimits.h>
-#define MAXCOMLEN 16 /* max command name remembered */
+#define MAXCOMLEN _MAXCOMLEN-1 /* max command name remembered, without NUL */
#define MAXINTERP 128 /* max interpreter file name length */
#define MAXLOGNAME LOGIN_NAME_MAX /* max login name length w/ NUL */
#define MAXUPRC CHILD_MAX /* max simultaneous processes */