projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'for-linus-4.9-2' of git://git.code.sf.net/p/openipmi/linux-ipmi
[cascardo/linux.git]
/
lib
/
kstrtox.c
diff --git
a/lib/kstrtox.c
b/lib/kstrtox.c
index
d8a5cf6
..
b8e2080
100644
(file)
--- a/
lib/kstrtox.c
+++ b/
lib/kstrtox.c
@@
-48,11
+48,9
@@
unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long
{
unsigned long long res;
unsigned int rv;
{
unsigned long long res;
unsigned int rv;
- int overflow;
res = 0;
rv = 0;
res = 0;
rv = 0;
- overflow = 0;
while (*s) {
unsigned int val;
while (*s) {
unsigned int val;
@@
-71,15
+69,13
@@
unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long
*/
if (unlikely(res & (~0ull << 60))) {
if (res > div_u64(ULLONG_MAX - val, base))
*/
if (unlikely(res & (~0ull << 60))) {
if (res > div_u64(ULLONG_MAX - val, base))
-
overflow = 1
;
+
rv |= KSTRTOX_OVERFLOW
;
}
res = res * base + val;
rv++;
s++;
}
*p = res;
}
res = res * base + val;
rv++;
s++;
}
*p = res;
- if (overflow)
- rv |= KSTRTOX_OVERFLOW;
return rv;
}
return rv;
}