diff options
author | Roy Marples <roy@marples.name> | 2008-02-18 16:26:49 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-02-18 16:26:49 +0000 |
commit | eedf63906dea4f6c139382495a67aeded1c51fe2 (patch) | |
tree | 751a65487f2bdc79d723280ed0a174803bd0840c | |
parent | b0442b31935caf87f0dc2d6679b4e106414513ed (diff) |
Fix compile on FreeBSD.
-rw-r--r-- | src/librc/librc-daemon.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c index fab3415b..2e97faa3 100644 --- a/src/librc/librc-daemon.c +++ b/src/librc/librc-daemon.c @@ -216,7 +216,7 @@ pid_t *rc_find_pids (const char *const *argv, const char *cmd, char **pargv; pid_t *pids = NULL; pid_t *tmp; - char *arg; + const char *const *arg; int npids = 0; int match; @@ -252,7 +252,7 @@ pid_t *rc_find_pids (const char *const *argv, const char *cmd, continue; } - if (argv && ! cmd) { + if (argv && *argv && ! cmd) { pargv = _KVM_GETARGV (kd, &kp[i], pargc); if (! pargv || ! *pargv) continue; @@ -260,8 +260,8 @@ pid_t *rc_find_pids (const char *const *argv, const char *cmd, arg = argv; match = 1; - while (arg && *pargv) - if (strcmp (arg++, *pargv++) != 0) { + while (*arg && *pargv) + if (strcmp (*arg++, *pargv++) != 0) { match = 0; break; } |