From f6d9787d30c6a58ea6c4c1612b89f4bd5dd8cb68 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 26 Oct 2021 00:35:01 +0200 Subject: tap, tcp: Fix two comparisons with different signedness reported by gcc 7 For some reason, those are not reported by recent versions of gcc. Signed-off-by: Stefano Brivio --- tap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tap.c') diff --git a/tap.c b/tap.c index d6bad5a..a3fc249 100644 --- a/tap.c +++ b/tap.c @@ -340,7 +340,7 @@ resume: iph = (struct iphdr *)(eh + 1); if ((iph->ihl * 4) + sizeof(*eh) > len) continue; - if (iph->ihl * 4 < sizeof(*iph)) + if (iph->ihl * 4 < (int)sizeof(*iph)) continue; if (iph->saddr && c->addr4_seen != iph->saddr) { -- cgit v1.2.3