diff options
-rw-r--r-- | daemon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/daemon.c b/daemon.c index f36e277..1bab9ef 100644 --- a/daemon.c +++ b/daemon.c @@ -70,7 +70,8 @@ static int parseConfig(const char *path) { if (!ptr[0] || ptr[0] == '#') { continue; } else if (ptr[0] == '%') { - int error = prependAdd(&ptr[1]); + ptr++; + int error = prependAdd(&ptr[strspn(ptr, WS)]); if (error) { syslog(LOG_WARNING, "cannot add prepend command: %m"); goto err; @@ -84,7 +85,7 @@ static int parseConfig(const char *path) { ); goto err; } - int error = serviceAdd(name, ptr); + int error = serviceAdd(name, &ptr[strspn(ptr, WS)]); if (error) { syslog(LOG_WARNING, "cannot add service: %m"); goto err; |