diff options
author | Denys Vlasenko | 2018-10-30 23:24:18 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-10-30 23:24:18 +0100 |
commit | 93ef5dd640ef41edc72c80fa59c7cc9427b5945b (patch) | |
tree | ed0a5c83cea2a34a7603cb5ff565fc82f92f31ea /libbb/bb_strtonum.c | |
parent | 63d053d8c3e991d86cbacccb9ba6ff03aedee5cd (diff) | |
download | busybox-93ef5dd640ef41edc72c80fa59c7cc9427b5945b.zip busybox-93ef5dd640ef41edc72c80fa59c7cc9427b5945b.tar.gz |
printf: fix printf "%u\n" +18446744073709551614
function old new delta
conv_strtoll 19 32 +13
conv_strtoull 49 61 +12
bb_strtoll 89 84 -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 25/-5) Total: 20 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/bb_strtonum.c')
-rw-r--r-- | libbb/bb_strtonum.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/bb_strtonum.c b/libbb/bb_strtonum.c index cb70f10..2185017 100644 --- a/libbb/bb_strtonum.c +++ b/libbb/bb_strtonum.c @@ -81,7 +81,7 @@ long long FAST_FUNC bb_strtoll(const char *arg, char **endp, int base) /* Check for the weird "feature": * a "-" string is apparently a valid "number" for strto[u]l[l]! * It returns zero and errno is 0! :( */ - first = (arg[0] != '-' && arg[0] != '+' ? arg[0] : arg[1]); + first = (arg[0] != '-' ? arg[0] : arg[1]); if (!isalnum(first)) return ret_ERANGE(); errno = 0; |