diff options
author | Max Kellermann <max@duempel.org> | 2009-01-02 16:24:16 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-02 16:24:16 +0100 |
commit | 8cf913854179f19d55362b333d6a2d3a0b203155 (patch) | |
tree | 9af97e87cf7cbecc54a88a78e70673a7a2f7087a /src | |
parent | e5b8a3b86d23fa4006a883c8123ba5fa07c4acee (diff) | |
download | mpd-8cf913854179f19d55362b333d6a2d3a0b203155.tar.gz mpd-8cf913854179f19d55362b333d6a2d3a0b203155.tar.xz mpd-8cf913854179f19d55362b333d6a2d3a0b203155.zip |
locate: use GLib instead of utils.h
Diffstat (limited to '')
-rw-r--r-- | src/locate.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/locate.c b/src/locate.c index 2004b132d..fb57c2cd0 100644 --- a/src/locate.c +++ b/src/locate.c @@ -18,12 +18,13 @@ #include "locate.h" #include "path.h" -#include "utils.h" #include "tag.h" #include "song.h" #include <glib.h> +#include <stdlib.h> + #define LOCATE_TAG_FILE_KEY "file" #define LOCATE_TAG_FILE_KEY_OLD "filename" #define LOCATE_TAG_ANY_KEY "any" @@ -60,14 +61,14 @@ static int initLocateTagItem(LocateTagItem * item, if (item->tagType < 0) return -1; - item->needle = xstrdup(needle); + item->needle = g_strdup(needle); return 0; } LocateTagItem *newLocateTagItem(const char *typeStr, const char *needle) { - LocateTagItem *ret = xmalloc(sizeof(LocateTagItem)); + LocateTagItem *ret = g_new(LocateTagItem, 1); if (initLocateTagItem(ret, typeStr, needle) < 0) { free(ret); @@ -99,7 +100,7 @@ int newLocateTagItemArrayFromArgArray(char *argArray[], if (numArgs % 2 != 0) return -1; - *arrayRet = xmalloc(sizeof(LocateTagItem) * numArgs / 2); + *arrayRet = g_new(LocateTagItem, numArgs / 2); for (i = 0, item = *arrayRet; i < numArgs / 2; i++, item++) { if (initLocateTagItem |