nouveau: change internal variables to avoid conflicts with macro args
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 13 Sep 2014 14:45:08 +0000 (10:45 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 13 Sep 2014 14:55:16 +0000 (10:55 -0400)
Reported by Coverity

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/nouveau/nouveau_render_t.c

index 0063dac..1625a87 100644 (file)
  */
 #define EMIT_VBO(out, ctx, start, delta, n) do {                       \
                struct nouveau_render_state *render = to_render_state(ctx); \
-               int npush = n;                                          \
+               int _npush = n;                                         \
                                                                        \
-               while (npush) {                                         \
-                       int npack = MIN2(npush, MAX_PACKET * MAX_OUT_##out); \
-                       npush -= npack;                                 \
+               while (_npush) {                                                \
+                       int _npack = MIN2(_npush, MAX_PACKET * MAX_OUT_##out); \
+                       _npush -= _npack;                                       \
                                                                        \
-                       BATCH_PACKET_##out((npack + MAX_OUT_##out - 1)  \
+                       BATCH_PACKET_##out((_npack + MAX_OUT_##out - 1) \
                                           / MAX_OUT_##out);            \
-                       while (npack) {                                 \
-                               int nout = MIN2(npack, MAX_OUT_##out);  \
-                               npack -= nout;                          \
+                       while (_npack) {                                \
+                               int _nout = MIN2(_npack, MAX_OUT_##out);\
+                               _npack -= _nout;                        \
                                                                        \
                                OUT_INDICES_##out(render, start, delta, \
-                                                 nout);                \
-                               start += nout;                          \
+                                                 _nout);               \
+                               start += _nout;                         \
                        }                                               \
                }                                                       \
        } while (0)