From b71d8c5deb0473ff8663b71a48f8fac2e0620987 Mon Sep 17 00:00:00 2001 From: Volker Schlecht <47375452+VlkrS@users.noreply.github.com> Date: Sun, 3 May 2026 20:32:28 +0200 Subject: [PATCH] Drop gratuitous SPAWN_MAX_TOKENS --- src/dispatch/bind_define.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 1c79ec1b..030821bd 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -1,6 +1,5 @@ #ifdef __OpenBSD__ #define SPAWN_MAX_ARGS 64 -#define SPAWN_MAX_TOKENS (SPAWN_MAX_ARGS - 1) #endif int32_t bind_to_view(const Arg *arg) { @@ -902,7 +901,7 @@ int32_t spawn(const Arg *arg) { char *token = strtok_r((char *)arg->v, " ", &last); - while (token != NULL && argc < SPAWN_MAX_TOKENS) { + while (token != NULL && argc < SPAWN_MAX_ARGS - 1) { glob_t p; if (glob(token, GLOB_DOOFFS, NULL, &p) == 0 && p.gl_pathc > 0) { argv[argc] = strdup(p.gl_pathv[0]);