summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aab54eb)
raw | patch | inline | side by side (parent: aab54eb)
author | Max Kellermann <max.kellermann@gmail.com> | |
Tue, 21 Mar 2017 21:36:27 +0000 (22:36 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Tue, 21 Mar 2017 21:36:27 +0000 (22:36 +0100) |
src/db_completion.c | patch | blob | history |
diff --git a/src/db_completion.c b/src/db_completion.c
index 739e145dfbc958d176d8fffdbfb0db55ab3034c6..025b426fc6c51a2673a9d7f9cc7e2f0a1082555d 100644 (file)
--- a/src/db_completion.c
+++ b/src/db_completion.c
#include "charset.h"
#include "mpdclient.h"
-#include <string.h>
-
GList *
gcmp_list_from_path(struct mpdclient *c, const gchar *path,
GList *list, gint types)
const struct mpd_directory *dir =
mpd_entity_get_directory(entity);
gchar *tmp = utf8_to_locale(mpd_directory_get_path(dir));
- gsize size = strlen(tmp)+2;
-
- name = g_malloc(size);
- g_strlcpy(name, tmp, size);
- g_strlcat(name, "/", size);
+ name = g_strconcat(tmp, "/", NULL);
g_free(tmp);
} else if (mpd_entity_get_type(entity) == MPD_ENTITY_TYPE_SONG &&
types & GCMP_TYPE_FILE) {