From 93ae0a106a99adee4507bfc1348cb0b64f5aec1b Mon Sep 17 00:00:00 2001 From: Eldad Zack Date: Fri, 6 Jul 2012 21:31:57 +0200 Subject: [PATCH] --- yaml --- r: 320396 b: refs/heads/master c: bbf43dc888833ac0539e437dbaeb28bfd4fbab9f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/sunrpc/cache.h | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 00d133fe0add..86515a2a08af 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d9c2ede63c74048dfddbb129c59ac01176b0ab71 +refs/heads/master: bbf43dc888833ac0539e437dbaeb28bfd4fbab9f diff --git a/trunk/include/linux/sunrpc/cache.h b/trunk/include/linux/sunrpc/cache.h index 6def1f6cc269..af42596a82f9 100644 --- a/trunk/include/linux/sunrpc/cache.h +++ b/trunk/include/linux/sunrpc/cache.h @@ -217,8 +217,6 @@ extern int qword_get(char **bpp, char *dest, int bufsize); static inline int get_int(char **bpp, int *anint) { char buf[50]; - char *ep; - int rv; int len = qword_get(bpp, buf, sizeof(buf)); if (len < 0) @@ -226,11 +224,9 @@ static inline int get_int(char **bpp, int *anint) if (len == 0) return -ENOENT; - rv = simple_strtol(buf, &ep, 0); - if (*ep) + if (kstrtoint(buf, 0, anint)) return -EINVAL; - *anint = rv; return 0; }