mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 19:36:18 +01:00
More alignment-related fixes.
Partial-backout 8a21d8d233
. The
assertions should have remained relaxed since these functions are used
with non-posix_memalign()ed data.
This commit is contained in:
parent
866e3dda60
commit
271997deb5
@ -1151,7 +1151,7 @@ random_instance_write (RandomInstance *instance,
|
|||||||
GRand *rand;
|
GRand *rand;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
g_assert_cmpint ((gsize) buffer & instance->alignment, ==, 0);
|
g_assert_cmpint ((gsize) buffer & ALIGN_BITS & instance->alignment, ==, 0);
|
||||||
|
|
||||||
rand = g_rand_new_with_seed (instance->seed);
|
rand = g_rand_new_with_seed (instance->seed);
|
||||||
for (i = 0; i < instance->size; i++)
|
for (i = 0; i < instance->size; i++)
|
||||||
@ -1178,7 +1178,7 @@ random_instance_assert (RandomInstance *instance,
|
|||||||
GRand *rand;
|
GRand *rand;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
g_assert_cmpint ((gsize) buffer & instance->alignment, ==, 0);
|
g_assert_cmpint ((gsize) buffer & ALIGN_BITS & instance->alignment, ==, 0);
|
||||||
g_assert_cmpint (size, ==, instance->size);
|
g_assert_cmpint (size, ==, instance->size);
|
||||||
|
|
||||||
rand = g_rand_new_with_seed (instance->seed);
|
rand = g_rand_new_with_seed (instance->seed);
|
||||||
@ -1201,7 +1201,7 @@ random_instance_check (RandomInstance *instance,
|
|||||||
GRand *rand;
|
GRand *rand;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
g_assert_cmpint ((gsize) buffer & instance->alignment, ==, 0);
|
g_assert_cmpint ((gsize) buffer & ALIGN_BITS & instance->alignment, ==, 0);
|
||||||
|
|
||||||
if (size != instance->size)
|
if (size != instance->size)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user