From 7d8381614174c6c70c5676cb230f0d9b034b27aa Mon Sep 17 00:00:00 2001
From: Marcin Slusarz <marcin.slusarz@gmail.com>
Date: Sun, 12 Jun 2011 16:40:40 +0200
Subject: nouveau: assert argument cannot have side effects

... because argument is evaluated only if NDEBUG is not defined
---
 nouveau/nouveau_pushbuf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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);
-- 
cgit v1.2.3