Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 126278
b: refs/heads/master
c: e899aa8
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Machek authored and Linus Torvalds committed Jan 6, 2009
1 parent 7cdedce commit 5c4a7e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff083c8372f6312bb3a8c7f7b748920aeeb210c9
refs/heads/master: e899aa823ad74860a17b541b0ad38f513728923d
4 changes: 4 additions & 0 deletions trunk/lib/vsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ int strict_strtoul(const char *cp, unsigned int base, unsigned long *res)
return -EINVAL;

val = simple_strtoul(cp, &tail, base);
if (tail == cp)
return -EINVAL;
if ((*tail == '\0') ||
((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {
*res = val;
Expand Down Expand Up @@ -241,6 +243,8 @@ int strict_strtoull(const char *cp, unsigned int base, unsigned long long *res)
return -EINVAL;

val = simple_strtoull(cp, &tail, base);
if (tail == cp)
return -EINVAL;
if ((*tail == '\0') ||
((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {
*res = val;
Expand Down

0 comments on commit 5c4a7e3

Please sign in to comment.