aboutsummaryrefslogtreecommitdiff
path: root/slirp/arp_table.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-11-14 16:36:31 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-01-14 00:43:30 +0100
commit2afbb788ff43c5cb5a91fb3da9cae6bd9a70731f (patch)
tree82ef676d69fd01861496a6efaaab8b86706c3337 /slirp/arp_table.c
parent90dfa2784164d1210ba95de462ce0f3b1030a698 (diff)
downloadqemu-2afbb788ff43c5cb5a91fb3da9cae6bd9a70731f.zip
qemu-2afbb788ff43c5cb5a91fb3da9cae6bd9a70731f.tar.gz
qemu-2afbb788ff43c5cb5a91fb3da9cae6bd9a70731f.tar.bz2
slirp: improve a bit the debug macros
Let them accept multiple arguments. Simplify the inner argument handling of DEBUG_ARGS/DEBUG_MISC_DEBUG_ERROR. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/arp_table.c')
-rw-r--r--slirp/arp_table.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/slirp/arp_table.c b/slirp/arp_table.c
index f81963b..ce19e6e 100644
--- a/slirp/arp_table.c
+++ b/slirp/arp_table.c
@@ -34,9 +34,9 @@ void arp_table_add(Slirp *slirp, uint32_t ip_addr, uint8_t ethaddr[ETH_ALEN])
DEBUG_CALL("arp_table_add");
DEBUG_ARG("ip = %s", inet_ntoa((struct in_addr){.s_addr = ip_addr}));
- DEBUG_ARGS((dfd, " hw addr = %02x:%02x:%02x:%02x:%02x:%02x\n",
- ethaddr[0], ethaddr[1], ethaddr[2],
- ethaddr[3], ethaddr[4], ethaddr[5]));
+ DEBUG_ARGS(" hw addr = %02x:%02x:%02x:%02x:%02x:%02x\n",
+ ethaddr[0], ethaddr[1], ethaddr[2],
+ ethaddr[3], ethaddr[4], ethaddr[5]);
if (ip_addr == 0 || ip_addr == 0xffffffff || ip_addr == broadcast_addr) {
/* Do not register broadcast addresses */
@@ -79,9 +79,9 @@ bool arp_table_search(Slirp *slirp, uint32_t ip_addr,
for (i = 0; i < ARP_TABLE_SIZE; i++) {
if (arptbl->table[i].ar_sip == ip_addr) {
memcpy(out_ethaddr, arptbl->table[i].ar_sha, ETH_ALEN);
- DEBUG_ARGS((dfd, " found hw addr = %02x:%02x:%02x:%02x:%02x:%02x\n",
- out_ethaddr[0], out_ethaddr[1], out_ethaddr[2],
- out_ethaddr[3], out_ethaddr[4], out_ethaddr[5]));
+ DEBUG_ARGS(" found hw addr = %02x:%02x:%02x:%02x:%02x:%02x\n",
+ out_ethaddr[0], out_ethaddr[1], out_ethaddr[2],
+ out_ethaddr[3], out_ethaddr[4], out_ethaddr[5]);
return 1;
}
}