gallium: init hw_key with memset() to silence valgrind warnings
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 30 Apr 2008 00:34:14 +0000 (18:34 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 30 Apr 2008 00:35:30 +0000 (18:35 -0600)
We shouldn't be hashing with keys that have uninitialized memory.

src/gallium/auxiliary/draw/draw_pt_emit.c

index 35707af8a89375534b12c01f58e5c98c5687a149..f9ac16786efc4c11e617fd9513ae10491d6750c9 100644 (file)
@@ -58,6 +58,8 @@ void draw_pt_emit_prepare( struct pt_emit *emit,
       return;
    }
 
+   memset(&hw_key, 0, sizeof(hw_key));
+
    /* Must do this after set_primitive() above:
     */
    vinfo = draw->render->get_vertex_info(draw->render);