summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-mempool.c
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 /dbus/dbus-mempool.c
parent5da911bce0310761514298444fde65d0a51ed85d (diff)
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.
Diffstat (limited to 'dbus/dbus-mempool.c')
-rw-r--r--dbus/dbus-mempool.c4
1 files changed, 4 insertions, 0 deletions
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.
*/