* Make the DPRINTF macro more robust. (Thanks Andrea Biardi)
This commit is contained in:
parent
3d44a79098
commit
a156e780a3
2
log.h
2
log.h
@ -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__ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user