diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-10-01 03:07:22 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-10-01 03:07:22 +0200 |
commit | 4a0eb0370c4df8ee01973b50bb460560532b79f1 (patch) | |
tree | ce2324f97b05ae50355961d47dea6cd003a4fc05 /networking/udhcp/dhcpc.c | |
parent | aaa0709e7b39d0dc22ac92443a86c84eaff58679 (diff) | |
download | busybox-w32-4a0eb0370c4df8ee01973b50bb460560532b79f1.tar.gz busybox-w32-4a0eb0370c4df8ee01973b50bb460560532b79f1.tar.bz2 busybox-w32-4a0eb0370c4df8ee01973b50bb460560532b79f1.zip |
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.c | 4 |
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) | |||
935 | /* verify IP checksum */ | 935 | /* verify IP checksum */ |
936 | check = packet.ip.check; | 936 | check = packet.ip.check; |
937 | packet.ip.check = 0; | 937 | packet.ip.check = 0; |
938 | if (check != inet_cksum((uint16_t *)&packet.ip, sizeof(packet.ip))) { | 938 | if (check != inet_cksum(&packet.ip, sizeof(packet.ip))) { |
939 | log1s("bad IP header checksum, ignoring"); | 939 | log1s("bad IP header checksum, ignoring"); |
940 | return -2; | 940 | return -2; |
941 | } | 941 | } |
@@ -960,7 +960,7 @@ static NOINLINE int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd) | |||
960 | packet.ip.tot_len = packet.udp.len; /* yes, this is needed */ | 960 | packet.ip.tot_len = packet.udp.len; /* yes, this is needed */ |
961 | check = packet.udp.check; | 961 | check = packet.udp.check; |
962 | packet.udp.check = 0; | 962 | packet.udp.check = 0; |
963 | if (check && check != inet_cksum((uint16_t *)&packet, bytes)) { | 963 | if (check && check != inet_cksum(&packet, bytes)) { |
964 | log1s("packet with bad UDP checksum received, ignoring"); | 964 | log1s("packet with bad UDP checksum received, ignoring"); |
965 | return -2; | 965 | return -2; |
966 | } | 966 | } |