From 3dc43bb915f5e0645d68601573988e122bb16dd1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 3 Jan 2009 13:38:48 +0100 Subject: strset: use GLib instead of utils.h --- src/strset.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 #include +#include #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; -- cgit v1.2.3