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