mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 19:18:09 +02:00
Merge branch 'element-size-morello' into 'master'
dbus-mempool.c: Ensure element_size is at least sizeof(void *) See merge request dbus/dbus!318
This commit is contained in:
commit
d7007915cc
1 changed files with 3 additions and 1 deletions
|
|
@ -149,7 +149,9 @@ _dbus_mem_pool_new (int element_size,
|
|||
/* Make the element size at least 8 bytes. */
|
||||
if (element_size < 8)
|
||||
element_size = 8;
|
||||
|
||||
if (element_size < (int) sizeof (void *))
|
||||
element_size = sizeof (void *);
|
||||
|
||||
/* these assertions are equivalent but the first is more clear
|
||||
* to programmers that see it fail.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue