summaryrefslogtreecommitdiffhomepage
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-10-01 03:07:22 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2020-10-01 03:07:22 +0200
commit4a0eb0370c4df8ee01973b50bb460560532b79f1 (patch)
treece2324f97b05ae50355961d47dea6cd003a4fc05 /networking/udhcp/dhcpc.c
parentaaa0709e7b39d0dc22ac92443a86c84eaff58679 (diff)
gcc-9.x warning fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index e13eb3f9f..66aa38c20 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -935,7 +935,7 @@ static NOINLINE int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd)
/* verify IP checksum */
check = packet.ip.check;
packet.ip.check = 0;
- if (check != inet_cksum((uint16_t *)&packet.ip, sizeof(packet.ip))) {
+ if (check != inet_cksum(&packet.ip, sizeof(packet.ip))) {
log1s("bad IP header checksum, ignoring");
return -2;
}
@@ -960,7 +960,7 @@ static NOINLINE int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd)
packet.ip.tot_len = packet.udp.len; /* yes, this is needed */
check = packet.udp.check;
packet.udp.check = 0;
- if (check && check != inet_cksum((uint16_t *)&packet, bytes)) {
+ if (check && check != inet_cksum(&packet, bytes)) {
log1s("packet with bad UDP checksum received, ignoring");
return -2;
}