diff options
author | glebius <glebius@FreeBSD.org> | 2014-01-03 12:06:54 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-01-03 12:06:54 +0000 |
commit | 342e85b451aca5f22f4f282e6f955bd39df5117e (patch) | |
tree | 7f5b2cf2e2705ec4ee4746c3f39ae4ae0e03d6b4 /sys/netgraph | |
parent | cc656cc660219d2f5e0627450dba87ab06da0044 (diff) | |
download | FreeBSD-src-342e85b451aca5f22f4f282e6f955bd39df5117e.zip FreeBSD-src-342e85b451aca5f22f4f282e6f955bd39df5117e.tar.gz |
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
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_l2tp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netgraph/ng_l2tp.c b/sys/netgraph/ng_l2tp.c index bd98e6c..85cd6c3 100644 --- a/sys/netgraph/ng_l2tp.c +++ b/sys/netgraph/ng_l2tp.c @@ -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)) |