Browse Source

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

pull/205/head
[anp/hsw] 2 years ago
parent
commit
e8a940148a
  1. 4
      nfq/darkmagic.c

4
nfq/darkmagic.c

@ -121,8 +121,8 @@ static void fill_tcphdr(
tcpopt[t] = 8; // kind tcpopt[t] = 8; // kind
tcpopt[t+1] = 10; // len tcpopt[t+1] = 10; // len
// forge only TSecr if orig timestamp is present // forge only TSecr if orig timestamp is present
*(uint32_t*)(tcpopt+t+2) = timestamps ? timestamps[0] : -1; *(uint32_t*)(tcpopt+t+2) = timestamps ? timestamps[0] : 0xFFFFFFFF;
*(uint32_t*)(tcpopt+t+6) = (timestamps && !(fooling & FOOL_TS)) ? timestamps[1] : -1; *(uint32_t*)(tcpopt+t+6) = (timestamps && !(fooling & FOOL_TS)) ? timestamps[1] : 0xFFFFFFFF;
t+=10; t+=10;
} }
if (scale_factor!=SCALE_NONE) if (scale_factor!=SCALE_NONE)

Loading…
Cancel
Save