summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2010-08-29 18:02:02 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2010-12-17 16:57:53 -0500
commitd41522113ec84e74f7915599fd7624f842be8862 (patch)
tree6e206a81bff9fc797aeb6509b744e0ecdc698f7d /test
parent337f0bff0d8965cb702175e0eedbf418b1e7f0b5 (diff)
test/utils.c: Initialize palette->rgba to 0.
That way it can be used with palettes that are not statically allocated, without causing valgrind issues.
Diffstat (limited to 'test')
-rw-r--r--test/utils.c2
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;