From e8a940148aa52906439fdbfa617628ef50d0a7f7 Mon Sep 17 00:00:00 2001 From: "[anp/hsw]" Date: Fri, 16 Aug 2024 19:54:48 +0700 Subject: [PATCH] fix signed and unsigned type in conditional expression [-Wsign-compare] --- nfq/darkmagic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nfq/darkmagic.c b/nfq/darkmagic.c index 2240cce..f44ba4d 100644 --- a/nfq/darkmagic.c +++ b/nfq/darkmagic.c @@ -121,8 +121,8 @@ static void fill_tcphdr( tcpopt[t] = 8; // kind tcpopt[t+1] = 10; // len // forge only TSecr if orig timestamp is present - *(uint32_t*)(tcpopt+t+2) = timestamps ? timestamps[0] : -1; - *(uint32_t*)(tcpopt+t+6) = (timestamps && !(fooling & FOOL_TS)) ? timestamps[1] : -1; + *(uint32_t*)(tcpopt+t+2) = timestamps ? timestamps[0] : 0xFFFFFFFF; + *(uint32_t*)(tcpopt+t+6) = (timestamps && !(fooling & FOOL_TS)) ? timestamps[1] : 0xFFFFFFFF; t+=10; } if (scale_factor!=SCALE_NONE)