aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-23 22:58:25 +0000
committerRoy Marples <roy@marples.name>2008-03-23 22:58:25 +0000
commita1b97682434237d84b0aa4a477d001029a7dc019 (patch)
tree192e196ac98bbfb566eda5633131ed51656080ee /src/librc
parent06635dedbc59ec84e1bcf2c443c54b9301204396 (diff)
Fix returning a service descriptions.
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/librc.c4
1 files changed, 2 insertions, 2 deletions
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);