mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-08 07:21:27 +00:00
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>
This commit is contained in:
parent
d7f6946630
commit
e1b0048e18
1 changed files with 3 additions and 3 deletions
|
@ -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,
|
static inline bool addr_match(const void *token1, const void *token2,
|
||||||
int prefixlen)
|
unsigned int prefixlen)
|
||||||
{
|
{
|
||||||
const __be32 *a1 = token1;
|
const __be32 *a1 = token1;
|
||||||
const __be32 *a2 = token2;
|
const __be32 *a2 = token2;
|
||||||
int pdw;
|
unsigned int pdw;
|
||||||
int pbi;
|
unsigned int pbi;
|
||||||
|
|
||||||
pdw = prefixlen >> 5; /* num of whole u32 in prefix */
|
pdw = prefixlen >> 5; /* num of whole u32 in prefix */
|
||||||
pbi = prefixlen & 0x1f; /* num of bits in incomplete u32 in prefix */
|
pbi = prefixlen & 0x1f; /* num of bits in incomplete u32 in prefix */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue