From: Søren Sandmann Pedersen Date: Sun, 29 Aug 2010 22:02:02 +0000 (-0400) Subject: test/utils.c: Initialize palette->rgba to 0. X-Git-Tag: 1.0_branch~377 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d41522113ec84e74f7915599fd7624f842be8862;p=profile%2Fivi%2Fpixman.git 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. --- 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;