diff options
author | Max Kellermann <max@duempel.org> | 2014-01-07 23:33:46 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-07 23:35:18 +0100 |
commit | 27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2 (patch) | |
tree | 3f200069ab73baa09898fe1f242c6fd85396e2ba /src/UpdateWalk.cxx | |
parent | 49f34fbf6861f10dbf9eb7549177888394926ff9 (diff) | |
download | mpd-27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2.tar.gz mpd-27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2.tar.xz mpd-27ca0db7a6143d2e479ff1ae52ec7c349ab1d4f2.zip |
util/Alloc: new library replacing GLib's g_malloc()
Diffstat (limited to 'src/UpdateWalk.cxx')
-rw-r--r-- | src/UpdateWalk.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/UpdateWalk.cxx b/src/UpdateWalk.cxx index 811978d52..3afcbbdf2 100644 --- a/src/UpdateWalk.cxx +++ b/src/UpdateWalk.cxx @@ -38,14 +38,14 @@ #include "fs/Traits.hxx" #include "fs/FileSystem.hxx" #include "fs/DirectoryReader.hxx" +#include "util/Alloc.hxx" #include "util/UriUtil.hxx" #include "Log.hxx" -#include <glib.h> - #include <assert.h> #include <sys/stat.h> #include <string.h> +#include <stdlib.h> #include <errno.h> bool walk_discard; @@ -426,7 +426,7 @@ static Directory * directory_make_uri_parent_checked(const char *uri) { Directory *directory = db_get_root(); - char *duplicated = g_strdup(uri); + char *duplicated = xstrdup(uri); char *name_utf8 = duplicated, *slash; while ((slash = strchr(name_utf8, '/')) != nullptr) { @@ -443,7 +443,7 @@ directory_make_uri_parent_checked(const char *uri) name_utf8 = slash + 1; } - g_free(duplicated); + free(duplicated); return directory; } |