@@ -29,13 +29,18 @@
static const uint8_t rfc1533_cookie[] = { RFC1533_COOKIE };
-#ifdef DEBUG
-#define DPRINTF(fmt, ...) \
-do if (slirp_debug & DBG_CALL) { fprintf(dfd, fmt, ## __VA_ARGS__); fflush(dfd); } while (0)
-#else
-#define DPRINTF(fmt, ...) do{}while(0)
+#ifndef DEBUG
+#define DEBUG 0
#endif
+#define DPRINTF(fmt, ...) \
+ do { \
+ if (DEBUG && (slirp_debug & DBG_CALL)) { \
+ fprintf(dfd, fmt, ## __VA_ARGS__); \
+ fflush(dfd); \
+ } \
+ } while (0)
+
static BOOTPClient *get_new_addr(Slirp *slirp, struct in_addr *paddr,
const uint8_t *macaddr)
{