summaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2017-03-24 02:07:50 +0300
committerSteffen Klassert <steffen.klassert@secunet.com>2017-03-24 07:03:12 +0100
commite1b0048e18d4637603cf6f43b9b24345abdeec5c (patch)
treeebe831d929a902493dd3814bff045c1984ff4638 /include/net/xfrm.h
parentd7f6946630bc324b9d791bee6dc41ff0d9469b0b (diff)
downloadlinux-e1b0048e18d4637603cf6f43b9b24345abdeec5c.tar.bz2
xfrm: use "unsigned int" in addr_match()
x86_64 is zero-extending arch so "unsigned int" is preferred over "int" for address calculations and extending to size_t. Space savings: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24 (-24) function old new delta xfrm_state_walk 708 696 -12 xfrm_selector_match 918 906 -12 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 6e03a1a31eef..43b93d1134ed 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -816,12 +816,12 @@ static inline void xfrm_state_hold(struct xfrm_state *x)
}
static inline bool addr_match(const void *token1, const void *token2,
- int prefixlen)
+ unsigned int prefixlen)
{
const __be32 *a1 = token1;
const __be32 *a2 = token2;
- int pdw;
- int pbi;
+ unsigned int pdw;
+ unsigned int pbi;
pdw = prefixlen >> 5; /* num of whole u32 in prefix */
pbi = prefixlen & 0x1f; /* num of bits in incomplete u32 in prefix */