From 906ca3e20418f6ec47eb313a915cca90712ad8a6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 3 Jan 2009 13:37:36 +0100 Subject: dbUtils: use GLib instead of utils.h --- src/dbUtils.c | 7 ++++--- 1 file 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 +#include + 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; -- cgit v1.2.3