Fix circular math macro.

Submitted by:		Lutz Donnerhacke via Dmitry Luhtionov
German lesson at:	http://lutz.donnerhacke.de/Blog/Der-Fluch-der-Stabilitaet
PR:			146082
This commit is contained in:
Gleb Smirnoff 2014-01-03 12:06:54 +00:00
parent 0cc726f25a
commit e5d72e64d9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260225

View File

@ -98,7 +98,7 @@ static MALLOC_DEFINE(M_NETGRAPH_L2TP, "netgraph_l2tp", "netgraph l2tp node");
#define L2TP_ENABLE_DSEQ 1 /* enable data seq # */
/* Compare sequence numbers using circular math */
#define L2TP_SEQ_DIFF(x, y) ((int)((int16_t)(x) - (int16_t)(y)))
#define L2TP_SEQ_DIFF(x, y) ((int16_t)((x) - (y)))
#define SESSHASHSIZE 0x0020
#define SESSHASH(x) (((x) ^ ((x) >> 8)) & (SESSHASHSIZE - 1))