2003-02-21 Anders Carlsson <andersca@codefactory.se>
authorAnders Carlsson <andersca@codefactory.se>
Fri, 21 Feb 2003 13:58:14 +0000 (13:58 +0000)
committerAnders Carlsson <andersca@codefactory.se>
Fri, 21 Feb 2003 13:58:14 +0000 (13:58 +0000)
* dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
element size at least 8 bytes, fixes mempool tests on
64-bit machines.

ChangeLog
dbus/dbus-mempool.c

index 070196d..f587072 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-21  Anders Carlsson  <andersca@codefactory.se>
+
+       * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
+       element size at least 8 bytes, fixes mempool tests on
+       64-bit machines.
+
 2003-02-20  Alexander Larsson  <alexl@redhat.com>
 
        * dbus/dbus-transport-unix.c (unix_do_iteration):
index 0d62e62..2fde256 100644 (file)
@@ -139,6 +139,10 @@ _dbus_mem_pool_new (int element_size,
   if (pool == NULL)
     return NULL;
 
+  /* Make the element size at least 8 bytes. */
+  if (element_size < 8)
+    element_size = 8;
+  
   /* these assertions are equivalent but the first is more clear
    * to programmers that see it fail.
    */