Skip to content

Commit

Permalink
[XFRM]: alg_key_len should be unsigned to avoid integer divides
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Jan 28, 2008
1 parent d88c305 commit ba749ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct xfrm_replay_state

struct xfrm_algo {
char alg_name[64];
int alg_key_len; /* in bits */
unsigned int alg_key_len; /* in bits */
char alg_key[0];
};

Expand Down

0 comments on commit ba749ae

Please sign in to comment.