From eedf63906dea4f6c139382495a67aeded1c51fe2 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 18 Feb 2008 16:26:49 +0000 Subject: Fix compile on FreeBSD. --- src/librc/librc-daemon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/librc/librc-daemon.c') 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; } -- cgit v1.2.3