--- dwm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dwm.c b/dwm.c index 253aba7..4c0f679 100644 --- a/dwm.c +++ b/dwm.c _AT_@ -1504,7 +1504,7 @@ setlayout(const Arg *arg) if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) selmon->sellt ^= 1; if (arg && arg->v) - selmon->lt[selmon->sellt] = (Layout *)arg->v; + selmon->lt[selmon->sellt] = (const Layout *)arg->v; strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol); if (selmon->sel) arrange(selmon); _AT_@ -1642,11 +1642,12 @@ spawn(const Arg *arg) if (arg->v == dmenucmd) dmenumon[0] = '0' + selmon->num; if (fork() == 0) { + char *const *cmd = arg->v; if (dpy) close(ConnectionNumber(dpy)); setsid(); - execvp(((char **)arg->v)[0], (char **)arg->v); - die("dwm: execvp '%s' failed:", ((char **)arg->v)[0]); + execvp(cmd[0], cmd); + die("dwm: execvp '%s' failed:", cmd[0]); } } -- 2.37.2Received on Mon Aug 22 2022 - 00:08:56 CEST
This archive was generated by hypermail 2.3.0 : Mon Aug 22 2022 - 07:00:48 CEST