Possible Duplicates:
Do-While and if-else statements in C/C++ macros
do { … } while (0) — what is it good for?
I'm reading the linux kernel and I found many macros like this:
#define INIT_LIST_HEAD(ptr) do { \
(ptr)->next = (ptr); (ptr)->prev = (ptr); \
} while (0)
Why do they use this rather than define it simply in a {}?