b5e14a1344
Reviewed by: roberto Security: VUXML: 4033d826-87dd-11e4-9079-3c970e169bc2 Security: http://www.kb.cert.org/vuls/id/852879 Security: CVE-2014-9293 Security CVE-2014-9294 Security CVE-2014-9295 Security CVE-2014-9296
28 lines
635 B
C
28 lines
635 B
C
/*
|
|
* $Header$
|
|
*
|
|
* $Created: Sat Aug 20 14:23:01 2005 $
|
|
*
|
|
* Copyright (C) 2005 by Frank Kardel
|
|
*/
|
|
#ifndef NTP_DEBUG_H
|
|
#define NTP_DEBUG_H
|
|
|
|
/*
|
|
* macro for debugging output - cut down on #ifdef pollution.
|
|
*
|
|
* TRACE() is similar to ntpd's DPRINTF() for utilities and libntp.
|
|
* Uses mprintf() and so supports %m, replaced by strerror(errno).
|
|
*
|
|
* The calling convention is not attractive:
|
|
* TRACE(debuglevel, (fmt, ...));
|
|
* TRACE(2, ("this will appear on stdout if debug >= %d\n", 2));
|
|
*/
|
|
#define TRACE(lvl, arg) \
|
|
do { \
|
|
if (debug >= (lvl)) \
|
|
mprintf arg; \
|
|
} while (0)
|
|
|
|
#endif /* NTP_DEBUG_H */
|