From bef6ddaf341287846fc39556265e100b467223bd Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 26 Feb 2007 21:09:38 +0000 Subject: Cleanup service list string creation --- hcid/storage.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'hcid/storage.c') 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; -- cgit