aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-03 13:38:48 +0100
committerMax Kellermann <max@duempel.org>2009-01-03 13:38:48 +0100
commit3dc43bb915f5e0645d68601573988e122bb16dd1 (patch)
tree21812df32f32a000f5ffbb643a8b8fb0f57322e3 /src
parent906ca3e20418f6ec47eb313a915cca90712ad8a6 (diff)
downloadmpd-3dc43bb915f5e0645d68601573988e122bb16dd1.tar.gz
mpd-3dc43bb915f5e0645d68601573988e122bb16dd1.tar.xz
mpd-3dc43bb915f5e0645d68601573988e122bb16dd1.zip
strset: use GLib instead of utils.h
Diffstat (limited to '')
-rw-r--r--src/strset.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/strset.c b/src/strset.c
index 8462736df..c5c3031b9 100644
--- a/src/strset.c
+++ b/src/strset.c
@@ -17,10 +17,10 @@
*/
#include "strset.h"
-#include "utils.h"
#include <assert.h>
#include <string.h>
+#include <stdlib.h>
#define NUM_SLOTS 16384
@@ -51,7 +51,7 @@ static unsigned calc_hash(const char *p) {
G_GNUC_MALLOC struct strset *strset_new(void)
{
- struct strset *set = xcalloc(1, sizeof(*set));
+ struct strset *set = g_new0(struct strset, 1);
return set;
}
@@ -93,7 +93,7 @@ void strset_add(struct strset *set, const char *value)
return;
/* insert it into the slot chain */
- slot = xmalloc(sizeof(*slot));
+ slot = g_new(struct strset_slot, 1);
slot->next = base_slot->next;
slot->value = value;
base_slot->next = slot;