summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@codefactory.se>2003-02-21 13:58:14 +0000
committerAnders Carlsson <andersca@codefactory.se>2003-02-21 13:58:14 +0000
commitbc1d2b04e5af52a95c7c6b4181f05d082d079df5 (patch)
treed9f7f70184b3ca03996e95ecdd9ab5efad1e185d
parent5da911bce0310761514298444fde65d0a51ed85d (diff)
downloaddbus-bc1d2b04e5af52a95c7c6b4181f05d082d079df5.tar.gz
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.
-rw-r--r--ChangeLog6
-rw-r--r--dbus/dbus-mempool.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 070196df..f587072f 100644
--- 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):
diff --git a/dbus/dbus-mempool.c b/dbus/dbus-mempool.c
index 0d62e62b..2fde2568 100644
--- a/dbus/dbus-mempool.c
+++ b/dbus/dbus-mempool.c
@@ -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.
*/