aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-02 16:55:48 +0100
committerMax Kellermann <max@duempel.org>2008-11-02 16:55:48 +0100
commit260a0cc33c335a96a6326c6fe24435f55f59b44e (patch)
treeec86e4e67e7fed153327e6aacade96564d41dfe8 /src
parent8b1f6ff3c8ed06ef469d29b4a691dc4776a3db82 (diff)
downloadmpd-260a0cc33c335a96a6326c6fe24435f55f59b44e.tar.gz
mpd-260a0cc33c335a96a6326c6fe24435f55f59b44e.tar.xz
mpd-260a0cc33c335a96a6326c6fe24435f55f59b44e.zip
music_pipe: use GLib instead of utils.h
Eliminate the deprecated utils.h memory allocation functions.
Diffstat (limited to 'src')
-rw-r--r--src/pipe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pipe.c b/src/pipe.c
index 9ad9a87d2..17b018ff1 100644
--- a/src/pipe.c
+++ b/src/pipe.c
@@ -18,9 +18,9 @@
#include "pipe.h"
#include "notify.h"
-#include "utils.h"
#include "audio_format.h"
+#include <glib.h>
#include <assert.h>
#include <string.h>
@@ -31,7 +31,7 @@ music_pipe_init(unsigned int size, struct notify *notify)
{
assert(size > 0);
- ob.chunks = xmalloc(size * sizeof(*ob.chunks));
+ ob.chunks = g_new(struct music_chunk, size);
ob.size = size;
ob.begin = 0;
ob.end = 0;
@@ -43,7 +43,7 @@ music_pipe_init(unsigned int size, struct notify *notify)
void music_pipe_free(void)
{
assert(ob.chunks != NULL);
- free(ob.chunks);
+ g_free(ob.chunks);
}
void music_pipe_clear(void)