len is always even (due to multiplication by 4) so we can omit
the check for odd len.
Signed-off-by: Vitezslav Samel <vitezslav(a)samel.cz>
---
src/packet.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/packet.c b/src/packet.c
index 38d424f..3f1f1da 100644
--- a/src/packet.c
+++ b/src/packet.c
@@ -49,9 +49,6 @@ static int verify_ipv4_hdr_chksum(struct iphdr *ip)
len -= 2;
}
- if (len > 0)
- sum += *(unsigned char *) addr;
-
while (sum >> 16)
sum = (sum & 0xffff) + (sum >> 16);
--
1.9.1