Skip to content

Commit ba749ae

Browse files
Eric Dumazetdavem330
authored andcommitted
[XFRM]: alg_key_len should be unsigned to avoid integer divides
alg_key_len is currently defined as 'signed int'. This unfortunatly leads to integer divides in several paths. Converting it to unsigned is safe and saves 208 bytes of text on i386. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d88c305 commit ba749ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/linux/xfrm.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ struct xfrm_replay_state
9292

9393
struct xfrm_algo {
9494
char alg_name[64];
95-
int alg_key_len; /* in bits */
95+
unsigned int alg_key_len; /* in bits */
9696
char alg_key[0];
9797
};
9898

0 commit comments

Comments
 (0)