[Pixman] [PATCH 5/7] test/utils.c: Initialize palette->rgba to 0.
Søren Sandmann
sandmann at daimi.au.dk
Tue Dec 14 12:02:15 PST 2010
From: Søren Sandmann Pedersen <ssp at redhat.com>
That way it can be used with palettes that are not statically
allocated, without causing valgrind issues.
---
test/utils.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/test/utils.c b/test/utils.c
index 4701bf6..cde9c62 100644
--- a/test/utils.c
+++ b/test/utils.c
@@ -528,6 +528,8 @@ initialize_palette (pixman_indexed_t *palette, uint32_t depth, int is_rgb)
for (i = 0; i < 32768; ++i)
palette->ent[i] = lcg_rand() & mask;
+ memset (palette->rgba, 0, sizeof (palette->rgba));
+
for (i = 0; i < mask + 1; ++i)
{
uint32_t rgba24;
--
1.6.0.6
More information about the Pixman
mailing list