RE: [Dri-devel] Re: [PATCH] CodingStyle fixes for drm_agpsupport
From: Peter \"Firefly\" Lund
Date: Tue Aug 12 2003 - 07:09:48 EST
On Mon, 11 Aug 2003, Sottek, Matthew J wrote:
> if(foo)
> DEBUG_PRINT("Foo!\n");
>
> works great for 100 years until someone recodes the DEBUG_PRINT
> macro to be 2 lines.
Then those "someone" shouldn't be allowed near a macro system.
This is the standard trick:
#define DEBUG_PRINT(x) do { \
stmt1; \
stmt2; \
} while (0)
-Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/