diff options
author | Max Kellermann <max@duempel.org> | 2009-01-03 13:37:36 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-03 13:37:36 +0100 |
commit | 906ca3e20418f6ec47eb313a915cca90712ad8a6 (patch) | |
tree | 36bddd8cf19acae605313566930bb00059c91c9f /src/dbUtils.c | |
parent | 6ce06a48632cd603784bafdd16a67c723e80257d (diff) | |
download | mpd-906ca3e20418f6ec47eb313a915cca90712ad8a6.tar.gz mpd-906ca3e20418f6ec47eb313a915cca90712ad8a6.tar.xz mpd-906ca3e20418f6ec47eb313a915cca90712ad8a6.zip |
dbUtils: use GLib instead of utils.h
Diffstat (limited to 'src/dbUtils.c')
-rw-r--r-- | src/dbUtils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c index c2a637b3a..d73366e67 100644 --- a/src/dbUtils.c +++ b/src/dbUtils.c @@ -21,7 +21,6 @@ #include "directory.h" #include "database.h" #include "client.h" -#include "utils.h" #include "playlist.h" #include "song.h" #include "song_print.h" @@ -32,6 +31,8 @@ #include <glib.h> +#include <stdlib.h> + typedef struct _ListCommandItem { int8_t tagType; int numConditionals; @@ -100,7 +101,7 @@ int searchForSongsIn(struct client *client, const char *name, int ret; int i; - char **originalNeedles = xmalloc(numItems * sizeof(char *)); + char **originalNeedles = g_new(char *, numItems); struct search_data data; for (i = 0; i < numItems; i++) { @@ -275,7 +276,7 @@ unsigned long sumSongTimesIn(const char *name) static ListCommandItem *newListCommandItem(int tagType, int numConditionals, LocateTagItem * conditionals) { - ListCommandItem *item = xmalloc(sizeof(ListCommandItem)); + ListCommandItem *item = g_new(ListCommandItem, 1); item->tagType = tagType; item->numConditionals = numConditionals; |