Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347654
b: refs/heads/master
c: 621eb19
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Nov 15, 2012
1 parent 111b27c commit 826dc96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2b4cf668a7b8f84182a35f07152d8b6f012629d2
refs/heads/master: 621eb19ce1ec216e03ad354cb0c4061736b2a436
6 changes: 5 additions & 1 deletion trunk/include/linux/sunrpc/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,20 @@ 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)
return -EINVAL;
if (len == 0)
return -ENOENT;

if (kstrtoint(buf, 0, anint))
rv = simple_strtol(buf, &ep, 0);
if (*ep)
return -EINVAL;

*anint = rv;
return 0;
}

Expand Down

0 comments on commit 826dc96

Please sign in to comment.