parse-util: rework safe_atou64() as wrapper around safe_atou64_full()
Follow-up for: 023f88a6ab
Claude complained...
This commit is contained in:
committed by
Lennart Poettering
parent
11879c717f
commit
ad18f634b6
@@ -78,16 +78,15 @@ static inline int safe_atollu(const char *s, unsigned long long *ret_llu) {
|
||||
return safe_atollu_full(s, 0, ret_llu);
|
||||
}
|
||||
|
||||
static inline int safe_atou64(const char *s, uint64_t *ret_u) {
|
||||
assert_cc(sizeof(uint64_t) == sizeof(unsigned long long));
|
||||
return safe_atollu(s, (unsigned long long*) ret_u);
|
||||
}
|
||||
|
||||
static inline int safe_atou64_full(const char *s, unsigned base, uint64_t *ret_u) {
|
||||
assert_cc(sizeof(uint64_t) == sizeof(unsigned long long));
|
||||
return safe_atollu_full(s, base, (unsigned long long*) ret_u);
|
||||
}
|
||||
|
||||
static inline int safe_atou64(const char *s, uint64_t *ret_u) {
|
||||
return safe_atou64_full(s, 0, ret_u);
|
||||
}
|
||||
|
||||
static inline int safe_atoi64(const char *s, int64_t *ret_i) {
|
||||
assert_cc(sizeof(int64_t) == sizeof(long long));
|
||||
return safe_atolli(s, (long long*) ret_i);
|
||||
|
||||
Reference in New Issue
Block a user