From bc1d2b04e5af52a95c7c6b4181f05d082d079df5 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 21 Feb 2003 13:58:14 +0000 Subject: 2003-02-21 Anders Carlsson * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the element size at least 8 bytes, fixes mempool tests on 64-bit machines. --- dbus/dbus-mempool.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dbus/dbus-mempool.c') 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. */ -- cgit