svn commit: r260225 - head/sys/netgraph
Gleb Smirnoff
glebius at FreeBSD.org
Fri Jan 3 12:06:55 UTC 2014
Author: glebius
Date: Fri Jan 3 12:06:54 2014
New Revision: 260225
URL: http://svnweb.freebsd.org/changeset/base/260225
Log:
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
Modified:
head/sys/netgraph/ng_l2tp.c
Modified: head/sys/netgraph/ng_l2tp.c
==============================================================================
--- head/sys/netgraph/ng_l2tp.c Fri Jan 3 11:03:12 2014 (r260224)
+++ head/sys/netgraph/ng_l2tp.c Fri Jan 3 12:06:54 2014 (r260225)
@@ -98,7 +98,7 @@ static MALLOC_DEFINE(M_NETGRAPH_L2TP, "n
#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))
More information about the svn-src-all
mailing list