diff options
author | Curtis McEnroe | 2018-10-28 02:14:22 -0400 |
---|---|---|
committer | Curtis McEnroe | 2018-10-28 02:14:22 -0400 |
commit | 36ec6cf258e9b5c3aa49cbfd3179a8714b52fee5 (patch) | |
tree | 5fe128d5375d5ea18a14ef1641da49e94d0f6f60 /event.c | |
parent | 9bc200bfe506ef7ffa1f8c6c3573f50fdc9776d9 (diff) |
Use const char *argv[] signatures
C is really weird about this stuff, but this makes more sense to me.
Diffstat (limited to 'event.c')
-rw-r--r-- | event.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/event.c b/event.c index cad170f..e9864ff 100644 --- a/event.c +++ b/event.c @@ -33,18 +33,18 @@ static struct { int fd; } spawn; -void eventWait(char *const argv[]) { +void eventWait(const char *argv[static 2]) { uiHide(); pid_t pid = fork(); if (pid < 0) err(EX_OSERR, "fork"); if (!pid) { - execvp(argv[0], argv); + execvp(argv[0], (char *const *)argv); err(EX_CONFIG, "%s", argv[0]); } spawn.wait = true; } -void eventPipe(char *const argv[]) { +void eventPipe(const char *argv[static 2]) { if (spawn.pipe) { uiLog(TagStatus, UIHot, L"event: existing pipe"); return; @@ -62,7 +62,7 @@ void eventPipe(char *const argv[]) { dup2(rw[1], STDOUT_FILENO); dup2(rw[1], STDERR_FILENO); close(rw[1]); - execvp(argv[0], argv); + execvp(argv[0], (char *const *)argv); perror(argv[0]); exit(EX_CONFIG); } |