* Make the DPRINTF macro more robust. (Thanks Andrea Biardi)

This commit is contained in:
Justin Maggard 2012-02-23 05:42:12 +00:00
parent 3d44a79098
commit a156e780a3

2
log.h
View File

@ -46,7 +46,7 @@ extern int log_level[L_MAX];
extern int log_init(const char *fname, const char *debug); extern int log_init(const char *fname, const char *debug);
extern void log_err(int level, enum _log_facility facility, char *fname, int lineno, char *fmt, ...); extern void log_err(int level, enum _log_facility facility, char *fname, int lineno, char *fmt, ...);
#define DPRINTF(level, facility, fmt, arg...) { log_err(level, facility, __FILE__, __LINE__, fmt, ##arg); } #define DPRINTF(level, facility, fmt, arg...) do { log_err(level, facility, __FILE__, __LINE__, fmt, ##arg); } while (0)
#endif /* __ERR_H__ */ #endif /* __ERR_H__ */