summaryrefslogtreecommitdiff
path: root/lib/strto.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-06-15 11:24:42 -0400
committerTom Rini <trini@konsulko.com>2020-06-15 11:24:42 -0400
commit287be3294af6179782f8a561afca427620504581 (patch)
tree898cce995f016c45a3ffcafb62f6f2f8acc9a0eb /lib/strto.c
parentbb1ff1371e23c699700a53a53b7c30c310b285fa (diff)
parent35c2683f46bdea96f1dfce404aee4369a824b68e (diff)
Merge branch '2020-06-15-misc-bugfixes'
- Assorted bug fixes
Diffstat (limited to 'lib/strto.c')
-rw-r--r--lib/strto.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/strto.c b/lib/strto.c
index 3d77115d4d..c00bb5895d 100644
--- a/lib/strto.c
+++ b/lib/strto.c
@@ -22,25 +22,9 @@ static const char *_parse_integer_fixup_radix(const char *s, unsigned int *base)
*base = 16;
else
*base = 8;
- } else {
- int i = 0;
- char var;
-
+ } else
*base = 10;
-
- do {
- var = tolower(s[i++]);
- if (var >= 'a' && var <= 'f') {
- *base = 16;
- break;
- }
-
- if (!(var >= '0' && var <= '9'))
- break;
- } while (var);
- }
}
-
if (*base == 16 && s[0] == '0' && tolower(s[1]) == 'x')
s += 2;
return s;