diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/cache.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 6def1f6cc269..af42596a82f9 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -217,8 +217,6 @@ extern int qword_get(char **bpp, char *dest, int bufsize); | |||
217 | static inline int get_int(char **bpp, int *anint) | 217 | static inline int get_int(char **bpp, int *anint) |
218 | { | 218 | { |
219 | char buf[50]; | 219 | char buf[50]; |
220 | char *ep; | ||
221 | int rv; | ||
222 | int len = qword_get(bpp, buf, sizeof(buf)); | 220 | int len = qword_get(bpp, buf, sizeof(buf)); |
223 | 221 | ||
224 | if (len < 0) | 222 | if (len < 0) |
@@ -226,11 +224,9 @@ static inline int get_int(char **bpp, int *anint) | |||
226 | if (len == 0) | 224 | if (len == 0) |
227 | return -ENOENT; | 225 | return -ENOENT; |
228 | 226 | ||
229 | rv = simple_strtol(buf, &ep, 0); | 227 | if (kstrtoint(buf, 0, anint)) |
230 | if (*ep) | ||
231 | return -EINVAL; | 228 | return -EINVAL; |
232 | 229 | ||
233 | *anint = rv; | ||
234 | return 0; | 230 | return 0; |
235 | } | 231 | } |
236 | 232 | ||