diff options
Diffstat (limited to 'lib/strnlen_user.c')
-rw-r--r-- | lib/strnlen_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c index 1c1a1b0e38a5..7f2db3fe311f 100644 --- a/lib/strnlen_user.c +++ b/lib/strnlen_user.c | |||
@@ -28,7 +28,7 @@ | |||
28 | static inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned long max) | 28 | static inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned long max) |
29 | { | 29 | { |
30 | const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS; | 30 | const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS; |
31 | long align, res = 0; | 31 | unsigned long align, res = 0; |
32 | unsigned long c; | 32 | unsigned long c; |
33 | 33 | ||
34 | /* | 34 | /* |
@@ -42,7 +42,7 @@ static inline long do_strnlen_user(const char __user *src, unsigned long count, | |||
42 | * Do everything aligned. But that means that we | 42 | * Do everything aligned. But that means that we |
43 | * need to also expand the maximum.. | 43 | * need to also expand the maximum.. |
44 | */ | 44 | */ |
45 | align = (sizeof(long) - 1) & (unsigned long)src; | 45 | align = (sizeof(unsigned long) - 1) & (unsigned long)src; |
46 | src -= align; | 46 | src -= align; |
47 | max += align; | 47 | max += align; |
48 | 48 | ||