Since ktr_comm is now a string, we do not need MAXCOMLEN to limit printf.
authorderaadt <deraadt@openbsd.org>
Tue, 22 Feb 2022 17:31:31 +0000 (17:31 +0000)
committerderaadt <deraadt@openbsd.org>
Tue, 22 Feb 2022 17:31:31 +0000 (17:31 +0000)
And thus, sys/param.h is not needed either.
ok millert

usr.bin/kdump/kdump.c

index a7fe190..5a0048a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kdump.c,v 1.147 2022/02/22 03:40:55 deraadt Exp $     */
+/*     $OpenBSD: kdump.c,v 1.148 2022/02/22 17:31:31 deraadt Exp $     */
 
 /*-
  * Copyright (c) 1988, 1993
@@ -29,7 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/param.h> /* MAXCOMLEN */
 #include <sys/time.h>
 #include <sys/signal.h>
 #include <sys/uio.h>
@@ -369,7 +368,7 @@ dumpheader(struct ktr_header *kth)
        basecol = printf("%6ld", (long)kth->ktr_pid);
        if (needtid)
                basecol += printf("/%-7ld", (long)kth->ktr_tid);
-       basecol += printf(" %-8.*s ", MAXCOMLEN, kth->ktr_comm);
+       basecol += printf(" %-8s ", kth->ktr_comm);
        if (timestamp != TIMESTAMP_NONE) {
                if (timestamp == TIMESTAMP_ELAPSED) {
                        if (prevtime.tv_sec == 0)