fix valgrind warning in test_display__stream

create_test_primary_surface::test_display_base.c creates a
QXLDevSurfaceCreate structure and initialize it, but doesn't set
the position field. Moreover, this structure has 4 bytes of padding
to the end (as shown by pahole from dwarves), so initialize the whole
structure to 0 before using it.
This commit is contained in:
Christophe Fergeau 2011-08-02 12:20:41 +02:00
parent b4c14b3bd8
commit a26f5714e4

View File

@ -235,7 +235,7 @@ static uint8_t primary_surface[HEIGHT * WIDTH * 4];
static void create_test_primary_surface(QXLWorker *worker)
{
QXLDevSurfaceCreate surface;
QXLDevSurfaceCreate surface = { 0, };
surface.format = SPICE_SURFACE_FMT_32_xRGB;
surface.width = WIDTH;