aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/vbo/vbo_rebase.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-09-06 08:49:13 +0200
committermarha <marha@users.sourceforge.net>2012-09-06 08:49:13 +0200
commitccc8a492607df715b08d27c6bb3b9d13b1ff48a2 (patch)
tree4311d252acd49786ceed60cb55343af0a9294a2f /mesalib/src/mesa/vbo/vbo_rebase.c
parenta4d007b9b60f2fc7c8de46533e2f47ecb24f3c9c (diff)
parentaa10a08696cae93799fcddae3f0245ceee905e01 (diff)
downloadvcxsrv-ccc8a492607df715b08d27c6bb3b9d13b1ff48a2.tar.gz
vcxsrv-ccc8a492607df715b08d27c6bb3b9d13b1ff48a2.tar.bz2
vcxsrv-ccc8a492607df715b08d27c6bb3b9d13b1ff48a2.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo_rebase.c')
-rw-r--r--mesalib/src/mesa/vbo/vbo_rebase.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_rebase.c b/mesalib/src/mesa/vbo/vbo_rebase.c
index fff9df0c2..d0bf6c59d 100644
--- a/mesalib/src/mesa/vbo/vbo_rebase.c
+++ b/mesalib/src/mesa/vbo/vbo_rebase.c
@@ -146,7 +146,7 @@ void vbo_rebase_prims( struct gl_context *ctx,
/* If we can just tell the hardware or the TNL to interpret our
* indices with a different base, do so.
*/
- tmp_prims = (struct _mesa_prim *)malloc(sizeof(*prim) * nr_prims);
+ tmp_prims = malloc(sizeof(*prim) * nr_prims);
for (i = 0; i < nr_prims; i++) {
tmp_prims[i] = prim[i];
@@ -195,7 +195,7 @@ void vbo_rebase_prims( struct gl_context *ctx,
else {
/* Otherwise the primitives need adjustment.
*/
- tmp_prims = (struct _mesa_prim *)malloc(sizeof(*prim) * nr_prims);
+ tmp_prims = malloc(sizeof(*prim) * nr_prims);
for (i = 0; i < nr_prims; i++) {
/* If this fails, it could indicate an application error:
@@ -242,11 +242,9 @@ void vbo_rebase_prims( struct gl_context *ctx,
ctx->Array._DrawArrays = saved_arrays;
ctx->NewDriverState |= ctx->DriverFlags.NewArray;
- if (tmp_indices)
- free(tmp_indices);
+ free(tmp_indices);
- if (tmp_prims)
- free(tmp_prims);
+ free(tmp_prims);
}