pspp-cvs
[Top][All Lists]
Advanced

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

[Pspp-cvs] Changes to pspp/src/hash.c


From: Ben Pfaff
Subject: [Pspp-cvs] Changes to pspp/src/hash.c
Date: Wed, 26 Oct 2005 01:07:07 -0400

Index: pspp/src/hash.c
diff -u pspp/src/hash.c:1.16 pspp/src/hash.c:1.17
--- pspp/src/hash.c:1.16        Tue Oct 25 04:28:17 2005
+++ pspp/src/hash.c     Wed Oct 26 05:06:14 2005
@@ -178,7 +178,7 @@
   if (size < 4)
     size = 4;
   h->size = next_power_of_2 (size);
-  h->entries = xmalloc (sizeof *h->entries * h->size);
+  h->entries = xnmalloc (h->size, sizeof *h->entries);
   for (i = 0; i < h->size; i++)
     h->entries[i] = NULL;
   h->aux = aux;
@@ -268,7 +268,7 @@
   end = begin + h->size;
 
   h->size = new_size;
-  h->entries = xmalloc (sizeof *h->entries * h->size);
+  h->entries = xnmalloc (h->size, sizeof *h->entries);
   for (i = 0; i < h->size; i++)
     h->entries[i] = NULL;
   for (table_p = begin; table_p < end; table_p++) 
@@ -385,7 +385,7 @@
   void **copy;
 
   assert (h != NULL);
-  copy = xmalloc ((h->used + 1) * sizeof *copy);
+  copy = xnmalloc ((h->used + 1), sizeof *copy);
   copy_if (h->entries, h->size, sizeof *h->entries, copy, not_null, NULL);
   copy[h->used] = NULL;
   return copy;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]