slirp: no need to make DPRINTF conditional on DEBUG
DEBUG_CALL is already handled conditionally. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
parent
d0ea546caf
commit
c2b3350b67
@ -36,11 +36,7 @@
|
|||||||
|
|
||||||
static const uint8_t rfc1533_cookie[] = { RFC1533_COOKIE };
|
static const uint8_t rfc1533_cookie[] = { RFC1533_COOKIE };
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
#define DPRINTF(fmt, ...) DEBUG_CALL(fmt, ##__VA_ARGS__)
|
#define DPRINTF(fmt, ...) DEBUG_CALL(fmt, ##__VA_ARGS__)
|
||||||
#else
|
|
||||||
#define DPRINTF(fmt, ...) do{}while(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static BOOTPClient *get_new_addr(Slirp *slirp, struct in_addr *paddr,
|
static BOOTPClient *get_new_addr(Slirp *slirp, struct in_addr *paddr,
|
||||||
const uint8_t *macaddr)
|
const uint8_t *macaddr)
|
||||||
@ -166,8 +162,9 @@ static void bootp_reply(Slirp *slirp, const struct bootp_t *bp)
|
|||||||
DPRINTF("bootp packet op=%d msgtype=%d", bp->bp_op, dhcp_msg_type);
|
DPRINTF("bootp packet op=%d msgtype=%d", bp->bp_op, dhcp_msg_type);
|
||||||
if (preq_addr.s_addr != htonl(0L))
|
if (preq_addr.s_addr != htonl(0L))
|
||||||
DPRINTF(" req_addr=%08" PRIx32 "\n", ntohl(preq_addr.s_addr));
|
DPRINTF(" req_addr=%08" PRIx32 "\n", ntohl(preq_addr.s_addr));
|
||||||
else
|
else {
|
||||||
DPRINTF("\n");
|
DPRINTF("\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (dhcp_msg_type == 0)
|
if (dhcp_msg_type == 0)
|
||||||
dhcp_msg_type = DHCPREQUEST; /* Force reply for old BOOTP clients */
|
dhcp_msg_type = DHCPREQUEST; /* Force reply for old BOOTP clients */
|
||||||
|
Loading…
Reference in New Issue
Block a user