util-lib: introduce parse_percent() for parsing percent specifications

And port a couple of users over to it.
This commit is contained in:
Lennart Poettering
2016-06-14 19:50:38 +02:00
parent d9ab2bcf05
commit 9184ca48ea
6 changed files with 59 additions and 40 deletions
+2
View File
@@ -105,3 +105,5 @@ static inline int safe_atozu(const char *s, size_t *ret_u) {
int safe_atod(const char *s, double *ret_d);
int parse_fractional_part_u(const char **s, size_t digits, unsigned *res);
int parse_percent(const char *p);