From a1b97682434237d84b0aa4a477d001029a7dc019 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 23 Mar 2008 22:58:25 +0000 Subject: Fix returning a service descriptions. --- src/librc/librc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/librc/librc.c') diff --git a/src/librc/librc.c b/src/librc/librc.c index 8ce9469d..376f45c7 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -447,12 +447,12 @@ char *rc_service_description(const char *service, const char *option) if (! (svc = rc_service_resolve(service))) return NULL; - if (! option) + if (!option) option = ""; l = strlen(DESCSTR) + strlen(svc) + strlen(option) + 2; cmd = xmalloc(sizeof(char) * l); - snprintf(cmd, l, DESCSTR, svc, option ? "_" : "", option); + snprintf(cmd, l, DESCSTR, svc, *option ? "_" : "", option); free(svc); if ((fp = popen(cmd, "r"))) { rc_getline(&desc, &len, fp); -- cgit v1.2.3