Properly casting the last argument to execl()

This commit is contained in:
Keith Bowes 2020-02-27 17:19:32 -05:00
parent 24a88ec13a
commit 744ec648f4
2 changed files with 2 additions and 2 deletions

View file

@ -39,7 +39,7 @@ int main(int argc, char **argv) {
if (startup_cmd) {
if (fork() == 0) {
execl("/bin/sh", "/bin/sh", "-c", startup_cmd, NULL);
execl("/bin/sh", "/bin/sh", "-c", startup_cmd, (char *) NULL);
}
}

View file

@ -27,7 +27,7 @@ static bool handle_keybinding(struct wb_server *server, xkb_keysym_t sym, uint32
wl_list_insert(server->views.prev, &current_view->link);
} else if (modifiers & WLR_MODIFIER_ALT && sym == XKB_KEY_F2) {
if (fork() == 0) {
execl("/bin/sh", "/bin/sh", "-c", "(obrun || bemenu-run || synapse || gmrun || gnome-do || dmenu_run) 2>/dev/null", NULL);
execl("/bin/sh", "/bin/sh", "-c", "(obrun || bemenu-run || synapse || gmrun || gnome-do || dmenu_run) 2>/dev/null", (char *) NULL);
}
} else {
return false;