diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2010-08-29 18:02:02 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2010-12-17 16:57:53 -0500 |
commit | d41522113ec84e74f7915599fd7624f842be8862 (patch) | |
tree | 6e206a81bff9fc797aeb6509b744e0ecdc698f7d /test | |
parent | 337f0bff0d8965cb702175e0eedbf418b1e7f0b5 (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.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; |