diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-04-09 11:18:26 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-04-09 11:29:55 +0200 |
commit | ce51632a357d347737bf40d3817df331cd8874cb (patch) | |
tree | 655c11a8a5943a8d7bd67f15caef3127f0c40b8b /src/basic/parse-util.c | |
parent | 1b87e27999d3c53469587c2faee66376d03391fb (diff) | |
download | systemd-ce51632a357d347737bf40d3817df331cd8874cb.tar.gz |
basic/parse-util: add safe_atoux64()
Diffstat (limited to 'src/basic/parse-util.c')
-rw-r--r-- | src/basic/parse-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c index e0094b0f37..8de5cd5c56 100644 --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c @@ -395,7 +395,7 @@ int safe_atoi(const char *s, int *ret_i) { return 0; } -int safe_atollu(const char *s, long long unsigned *ret_llu) { +int safe_atollu_full(const char *s, unsigned base, long long unsigned *ret_llu) { char *x = NULL; unsigned long long l; @@ -404,7 +404,7 @@ int safe_atollu(const char *s, long long unsigned *ret_llu) { s += strspn(s, WHITESPACE); errno = 0; - l = strtoull(s, &x, 0); + l = strtoull(s, &x, base); if (errno > 0) return -errno; if (!x || x == s || *x != 0) |