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.
This commit is contained in:
Anders Carlsson 2003-02-21 13:58:14 +00:00
parent 5da911bce0
commit bc1d2b04e5
2 changed files with 10 additions and 0 deletions

View file

@ -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):

View 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.
*/