fix signed and unsigned type in conditional expression [-Wsign-compare]

This commit is contained in:
[anp/hsw] 2024-08-16 19:54:48 +07:00
parent 4a2adc8ca2
commit e8a940148a

View File

@ -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)