nouveau: assert argument cannot have side effects

... because argument is evaluated only if NDEBUG is not defined
main
Marcin Slusarz 2011-06-12 16:40:40 +02:00
parent 763b618d55
commit 7d83816141
1 changed files with 2 additions and 1 deletions

View File

@ -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);