From 4a0eb0370c4df8ee01973b50bb460560532b79f1 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 1 Oct 2020 03:07:22 +0200 Subject: gcc-9.x warning fixes Signed-off-by: Denys Vlasenko --- networking/udhcp/packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'networking/udhcp/packet.c') diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index 6d43752..5137464 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c @@ -164,14 +164,14 @@ int FAST_FUNC udhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt, packet.udp.len = htons(UDP_DHCP_SIZE - padding); /* for UDP checksumming, ip.len is set to UDP packet len */ packet.ip.tot_len = packet.udp.len; - packet.udp.check = inet_cksum((uint16_t *)&packet, + packet.udp.check = inet_cksum(&packet, IP_UDP_DHCP_SIZE - padding); /* but for sending, it is set to IP packet len */ packet.ip.tot_len = htons(IP_UDP_DHCP_SIZE - padding); packet.ip.ihl = sizeof(packet.ip) >> 2; packet.ip.version = IPVERSION; packet.ip.ttl = IPDEFTTL; - packet.ip.check = inet_cksum((uint16_t *)&packet.ip, sizeof(packet.ip)); + packet.ip.check = inet_cksum(&packet.ip, sizeof(packet.ip)); udhcp_dump_packet(dhcp_pkt); result = sendto(fd, &packet, IP_UDP_DHCP_SIZE - padding, /*flags:*/ 0, -- cgit v1.1