From b3006e9ac3a6543dfdb59d9f0b465c52c6a17fb5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 18 Oct 2009 20:35:59 +0200 Subject: [PATCH] hscroll: use g_strconcat() instead of g_strlcpy() + g_strlcat() --- src/hscroll.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/hscroll.c b/src/hscroll.c index 00bda79..481683c 100644 --- a/src/hscroll.c +++ b/src/hscroll.c @@ -38,10 +38,7 @@ strscroll(struct hscroll *hscroll, const char *str, const char *separator, return g_strdup(str); /* create a buffer containing the string and the separator */ - size = strlen(str)+strlen(separator)+1; - tmp = g_malloc(size); - g_strlcpy(tmp, str, size); - g_strlcat(tmp, separator, size); + tmp = g_strconcat(str, separator, NULL); len = utf8_width(tmp); if (hscroll->offset >= len) -- 2.30.2