Possible Duplicate:
Why are there sometimes meaningless do/while and if/else statements in C/C++ macros?
Why is C source code I run across sometimes wrapped with a do...while(0)
loop?
do {
parser->http_errno = e;
parser->error_lineno = __LINE__;
} while (0)
Why use that, versus this:
parser->http_errno = e;
parser->error_lineno = __LINE__;
I suspect this has something to do with thread safety, but I'm not sure.