D
dspfun
Hi all!
Can you see anything wrong or "bad" with the following macro?
#define LOG(level, msg) \
openlog (__FUNCTION__, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_USER);
\
syslog (level, "%s", msg);\
closelog ();
I have problems using the macro with ternary operators. I believe it
should have parantheses around it all, but I cannot get it right.
Brs,
Markus
Can you see anything wrong or "bad" with the following macro?
#define LOG(level, msg) \
openlog (__FUNCTION__, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_USER);
\
syslog (level, "%s", msg);\
closelog ();
I have problems using the macro with ternary operators. I believe it
should have parantheses around it all, but I cannot get it right.
Brs,
Markus