From e8e921086851845fff8c6c097e00363046415b6d Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 8 Apr 2009 00:29:15 -0400 Subject: [PATCH] Patched to compile. --- mojoshader_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mojoshader_common.c b/mojoshader_common.c index a877bdb9..50684bbf 100644 --- a/mojoshader_common.c +++ b/mojoshader_common.c @@ -66,16 +66,16 @@ HashTable *hash_create(const uint32 initial_table_size, MOJOSHADER_malloc m, MOJOSHADER_free f, void *d) { const uint32 alloc_len = sizeof (HashItem *) * initial_table_size; - HashTable *table = (HashTable *) m(sizeof (HashTable)); + HashTable *table = (HashTable *) m(sizeof (HashTable), d); if (table == NULL) - return 0; + return NULL; memset(table, '\0', sizeof (HashTable)); table->table = (HashItem **) m(alloc_len, d); if (table->table == NULL) { f(table, d); - return 0; + return NULL; } // if memset(table->table, '\0', alloc_len); @@ -87,7 +87,7 @@ HashTable *hash_create(const uint32 initial_table_size, table->malloc = m; table->free = f; table->malloc_data = d; - return 1; + return table; } // hash_create void hash_destroy(HashTable *table)