aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple/i915_prim_vbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_prim_vbuf.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_prim_vbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/pipe/i915simple/i915_prim_vbuf.c b/src/mesa/pipe/i915simple/i915_prim_vbuf.c
index 35174c64a01..1c8c6a37ba6 100644
--- a/src/mesa/pipe/i915simple/i915_prim_vbuf.c
+++ b/src/mesa/pipe/i915simple/i915_prim_vbuf.c
@@ -101,7 +101,7 @@ static INLINE struct vbuf_stage *vbuf_stage( struct draw_stage *stage )
static INLINE boolean
overflow( void *map, void *ptr, unsigned bytes, unsigned bufsz )
{
- unsigned long used = (char *)ptr - (char *)map;
+ unsigned long used = (unsigned long) ((char *)ptr - (char *)map);
return (used + bytes) > bufsz;
}
@@ -438,7 +438,7 @@ struct draw_stage *i915_draw_vbuf_stage( struct i915_context *i915 )
assert(IBUF_SIZE < UNDEFINED_VERTEX_ID);
/* FIXME: free this memory on takedown */
- vbuf->element_map = malloc( IBUF_SIZE );
+ vbuf->element_map = MALLOC( IBUF_SIZE );
vbuf->vertex_map = NULL;
vbuf->vertex_ptr = vbuf->vertex_map;