[babl] fix element size when allocating chain_table



commit 07dec870b9b16d58665c9b9e734d1f4e6329123a
Author: Nils Philippsen <nils redhat com>
Date:   Thu May 26 12:22:23 2011 +0200

    fix element size when allocating chain_table

 babl/babl-hash-table.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/babl/babl-hash-table.c b/babl/babl-hash-table.c
index 99b7427..d507cb2 100644
--- a/babl/babl-hash-table.c
+++ b/babl/babl-hash-table.c
@@ -119,7 +119,7 @@ hash_rehash (BablHashTable *htab)
   if (nhtab->mask)
     {
       nhtab->data_table = babl_calloc (sizeof (BablInstance *), babl_hash_table_size(nhtab));
-      nhtab->chain_table = babl_malloc (sizeof (int *) * babl_hash_table_size(nhtab));
+      nhtab->chain_table = babl_malloc (sizeof (int) * babl_hash_table_size(nhtab));
       memset (nhtab->chain_table, -1, sizeof (int) * babl_hash_table_size(nhtab));
     }
 
@@ -175,7 +175,7 @@ babl_hash_table_init (BablHashValFunction  hfunc,
   if (htab->mask)
   {
       htab->data_table = babl_calloc (sizeof (BablInstance *), babl_hash_table_size(htab));
-      htab->chain_table = babl_malloc (sizeof (int *) * babl_hash_table_size(htab));
+      htab->chain_table = babl_malloc (sizeof (int) * babl_hash_table_size(htab));
       memset (htab->chain_table, -1, sizeof (int) * babl_hash_table_size(htab));
   }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]