Subject: Re: halt/reset on assert?

From: Benjamin Herrenschmidt <[email-masked]>
Date: Thu, 07 Apr 2011 17:55:33 +1000

On Wed, 2011-04-06 at 14:01 +0100, Evan Lavelle wrote:
> #define MY_ASSERT(expr) if(!(expr)) BUG()

Make it

#define MY_ASSERT(expr) do { if .... } while(0)

To ensure it has proper single statement semantics in C.

Cheers,
Ben.