From: Max Kellermann Date: Sun, 18 Oct 2009 18:35:59 +0000 (+0200) Subject: hscroll: use g_strconcat() instead of g_strlcpy() + g_strlcat() X-Git-Tag: release-0.16~77 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b3006e9ac3a6543dfdb59d9f0b465c52c6a17fb5;p=ncmpc.git hscroll: use g_strconcat() instead of g_strlcpy() + g_strlcat() --- 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)