diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-02-26 21:09:38 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-02-26 21:09:38 +0000 |
commit | bef6ddaf341287846fc39556265e100b467223bd (patch) | |
tree | 7fd5ad0660ace74b90e23b3b3f5fca99d482f9be | |
parent | 04a18d65207a17e4005c0c7d71c7aa01be1659fb (diff) |
Cleanup service list string creation
-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; |