From 8c72b2cbc6ff9b9ca52ac6743bfa99d555bcb280 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 8 Mar 2021 08:29:53 +0100 Subject: [PATCH] ui: don't cast to void* when calling display_rawhost() The provided types are compatible with the function signature. Moreover, this seems to hide a bug where `display_rawhost()` is called with an address instead of an MPLS struct. --- ui/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/net.c b/ui/net.c index e4752b7..c71440b 100644 --- a/ui/net.c +++ b/ui/net.c @@ -256,7 +256,7 @@ static void net_process_ping( memcpy(&nh->addrs[i], &nh->addr, sockaddr_addr_size(sourcesockaddr)); nh->mplss[i] = nh->mpls; - display_rawhost(ctl, index, (void *)&(nh->addrs[i]), (void *)&(nh->addrs[i])); + display_rawhost(ctl, index, &nh->addrs[i], &nh->mpls); } /* Always save the latest host in nh->addr. This @@ -264,7 +264,7 @@ static void net_process_ping( */ memcpy(&nh->addr, addrcopy, sockaddr_addr_size(sourcesockaddr)); nh->mpls = *mpls; - display_rawhost(ctl, index, (void *)&(nh->addr), (void *)&(nh->mpls)); + display_rawhost(ctl, index, &nh->addr, &nh->mpls); } nh->jitter = totusec - nh->last; -- 2.47.2