Browse Source

vbo: init prim[] array with memset()

This fixes a Coverity warning about uninitialized data.
tags/mesa-7.11-rc1
Brian Paul 14 years ago
parent
commit
0630593c5f
1 changed files with 2 additions and 6 deletions
  1. 2
    6
      src/mesa/vbo/vbo_exec_array.c

+ 2
- 6
src/mesa/vbo/vbo_exec_array.c View File

@@ -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 */

Loading…
Cancel
Save