summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-04-15 08:32:56 -0600
committerBrian Paul <[email protected]>2011-04-15 08:33:20 -0600
commit0630593c5fb22fe0f98f2c815c4a315056a9e3d2 (patch)
treee8ab346005a68f5a9b1fd0b61f40ec7230941619 /src/mesa
parent1b800c10e4aa3a9792e221043c54bbc930b50829 (diff)
vbo: init prim[] array with memset()
This fixes a Coverity warning about uninitialized data.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 6e26e4e77a0..a49cd5017a3 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -585,15 +585,11 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
if (ctx->NewState)
_mesa_update_state(ctx);
+ /* init most fields to zero */
+ memset(prim, 0, sizeof(prim));
prim[0].begin = 1;
prim[0].end = 1;
- prim[0].weak = 0;
- prim[0].pad = 0;
prim[0].mode = mode;
- prim[0].start = 0; /* filled in below */
- prim[0].count = 0; /* filled in below */
- prim[0].indexed = 0;
- prim[0].basevertex = 0;
prim[0].num_instances = numInstances;
/* Implement the primitive restart index */