diff options
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/storage.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/hcid/storage.c b/hcid/storage.c index 145a0f82..be46cdd6 100644 --- a/hcid/storage.c +++ b/hcid/storage.c @@ -526,13 +526,8 @@ static char *service_list_to_string(GSList *services) int ret; char *ident = services->data; - if (services->next) - ret = snprintf(str + len, sizeof(str) - len - 1, "%s ", - ident); - - else - ret = snprintf(str + len, sizeof(str) - len - 1, "%s", - ident); + ret = snprintf(str + len, sizeof(str) - len - 1, "%s%s", + ident, services->next ? " " : ""); if (ret > 0) len += ret; |