diff options
author | Roy Marples <roy@marples.name> | 2008-03-23 22:58:25 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-03-23 22:58:25 +0000 |
commit | a1b97682434237d84b0aa4a477d001029a7dc019 (patch) | |
tree | 192e196ac98bbfb566eda5633131ed51656080ee /src | |
parent | 06635dedbc59ec84e1bcf2c443c54b9301204396 (diff) |
Fix returning a service descriptions.
Diffstat (limited to 'src')
-rw-r--r-- | src/librc/librc.c | 4 |
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); |