mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-09 23:50:21 -04:00
Drop gratuitous SPAWN_MAX_TOKENS
This commit is contained in:
parent
bdcfe21ace
commit
b71d8c5deb
1 changed files with 1 additions and 2 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue