summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2013-05-15 16:59:28 +0100
committerJosé Fonseca <[email protected]>2013-05-15 16:59:28 +0100
commit2a43dfda95c70c3dd08f0dc3882f236f3a8f80e0 (patch)
tree1001511fd07f75215b18f0678591f973782ea324 /src/gallium/auxiliary/draw
parent1883e1d3e972f552aaf6225390a4dc17484fcd3c (diff)
draw: More defensive coding in DRAW_GET_IDX.
Doesn't make a difference ATM, but just in case.
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 44698db93d0..1b2d55fac55 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -466,7 +466,7 @@ draw_get_rasterizer_no_cull( struct draw_context *draw,
* If the index buffer would overflow we return the
* index of the first element in the vb.
*/
-#define DRAW_GET_IDX(elts, i) \
- ((i) >= draw->pt.user.eltMax) ? 0 : elts[i]
+#define DRAW_GET_IDX(_elts, _i) \
+ (((_i) >= draw->pt.user.eltMax) ? 0 : (_elts)[_i])
#endif /* DRAW_PRIVATE_H */