diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-05-05 11:31:35 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-05-05 11:31:35 +0200 |
commit | 8e91536a000c1738e354827d6f72965fa1444985 (patch) | |
tree | cb48104fa7a635e82d2b8b8eed6af6fe671756f2 /lib/strtox.c | |
parent | 30cce0c7414498317a43b2020dc1737b007acf98 (diff) | |
parent | 0071bacb4c7cab21c9fab8540f5aa9922a270a85 (diff) | |
download | barebox-8e91536a000c1738e354827d6f72965fa1444985.tar.gz barebox-8e91536a000c1738e354827d6f72965fa1444985.tar.xz |
Merge branch 'for-next/parameter-types'
Diffstat (limited to 'lib/strtox.c')
-rw-r--r-- | lib/strtox.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/strtox.c b/lib/strtox.c index 3bb6b0ef89..4b601a1b39 100644 --- a/lib/strtox.c +++ b/lib/strtox.c @@ -73,3 +73,12 @@ unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int bas return result; } EXPORT_SYMBOL(simple_strtoull); + +long long simple_strtoll(const char *cp, char **endp, unsigned int base) +{ + if (*cp == '-') + return -simple_strtoull(cp + 1, endp, base); + + return simple_strtoull(cp, endp, base); +} +EXPORT_SYMBOL(simple_strtoll); |