lkml.org 
[lkml]   [2003]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Coding technique question
From
Date

i-yi-yi.



/*
* Clarity concerning the
* do {
* ...
* } while (0);
* construct!
*/
#define MACRO_BLOCK_BEGIN do {
#define MACRO_BLOCK_END } while (0);





> See the Kernel Newbies FAQ at http://kernelnewbies.org/faq/
> Q: "Why do a lot of #defines in the kernel use do { ... } while(0)? "
>
> Best regards,
>
> Aschwin Marsman

--
David Nicol, independent consultant and contractor
Senator Orrin Hatch rewinds his DVDs

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.042 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site