[Linux-cluster] [PATCH 0/4] fence
Lon Hohberger
lhh at redhat.com
Fri Feb 18 21:23:06 UTC 2005
On Fri, 2005-02-18 at 13:28 -0500, Lon Hohberger wrote:
> On Fri, 2005-02-18 at 12:01 +0800, David Teigland wrote:
>
> > For reference, existing:
> >
> > #define die(fmt, args...) \
> > do \
> > { \
> > fprintf(stderr, "%s: ", prog_name); \
> > fprintf(stderr, fmt "\n", ##args); \
> > syslog(LOG_ERR, fmt, ##args); \
> > exit(EXIT_FAILURE); \
> > } \
> > while (0)
Side note:
#define die(fmt, ...) \
do \
{ \
fprintf(stderr, "%s: ", prog_name); \
fprintf(stderr, fmt "\n", __VA_ARGS__); \
syslog(LOG_ERR, fmt, __VA_ARGS__); \
exit(EXIT_FAILURE); \
}\
while (0)
...is functionally equivalent, is ISO-C99 compliant (as to opposed to a
"GNUism"), and does not rely on the compiler actually successfully
inlining anything.
-- Lon
More information about the Linux-cluster
mailing list