diff --git a/sys/netinet/tcp_seq.h b/sys/netinet/tcp_seq.h index b29ae2aaf78a..b6e682ec1fe4 100644 --- a/sys/netinet/tcp_seq.h +++ b/sys/netinet/tcp_seq.h @@ -47,10 +47,10 @@ #define SEQ_MIN(a, b) ((SEQ_LT(a, b)) ? (a) : (b)) #define SEQ_MAX(a, b) ((SEQ_GT(a, b)) ? (a) : (b)) -#define WIN_LT(a,b) ((short)(ntohs(a)-ntohs(b)) < 0) -#define WIN_LEQ(a,b) ((short)(ntohs(a)-ntohs(b)) <= 0) -#define WIN_GT(a,b) ((short)(ntohs(a)-ntohs(b)) > 0) -#define WIN_GEQ(a,b) ((short)(ntohs(a)-ntohs(b)) >= 0) +#define WIN_LT(a,b) (ntohs(a) < ntohs(b)) +#define WIN_LEQ(a,b) (ntohs(a) <= ntohs(b)) +#define WIN_GT(a,b) (ntohs(a) > ntohs(b)) +#define WIN_GEQ(a,b) (ntohs(a) >= ntohs(b)) #define WIN_MIN(a, b) ((WIN_LT(a, b)) ? (a) : (b)) #define WIN_MAX(a, b) ((WIN_GT(a, b)) ? (a) : (b))