summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2011-06-12 16:40:40 +0200
committerMarcin Slusarz <marcin.slusarz@gmail.com>2011-09-18 15:26:16 +0200
commit7d8381614174c6c70c5676cb230f0d9b034b27aa (patch)
tree44066154c35e72aebed7a6d07643a6a762e467c1
parent763b618d55a973807823bb1a1c6e60b9e2db6d8b (diff)
nouveau: assert argument cannot have side effects
... because argument is evaluated only if NDEBUG is not defined
-rw-r--r--nouveau/nouveau_pushbuf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nouveau/nouveau_pushbuf.c b/nouveau/nouveau_pushbuf.c
index 90836bcd..59f60d9f 100644
--- a/nouveau/nouveau_pushbuf.c
+++ b/nouveau/nouveau_pushbuf.c
@@ -270,7 +270,8 @@ nouveau_pushbuf_flush(struct nouveau_channel *chan, unsigned min)
nvpb->nr_push = 0;
/* Allocate space for next push buffer */
- assert(!nouveau_pushbuf_space(chan, min));
+ if (nouveau_pushbuf_space(chan, min))
+ assert(0);
if (chan->flush_notify)
chan->flush_notify(chan);