Fix returning a service descriptions.
This commit is contained in:
parent
06635dedbc
commit
a1b9768243
@ -452,7 +452,7 @@ char *rc_service_description(const char *service, const char *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);
|
||||
|
Loading…
Reference in New Issue
Block a user