From 1af6984c57cce5169491d308b58a9c85464b2159 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 22 Nov 2023 20:41:34 +0100 Subject: libxtables: Introduce xtables_strtoul_base() Semantically identical to xtables_strtoul() but accepts the base as parameter so callers may force it irrespective of number prefix. The old xtables_strtoul() becomes a shallow wrapper. Signed-off-by: Phil Sutter --- include/xtables.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/xtables.h') diff --git a/include/xtables.h b/include/xtables.h index 087a1d60..1a9e08bb 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -486,6 +486,8 @@ extern void xtables_register_matches(struct xtables_match *, unsigned int); extern void xtables_register_target(struct xtables_target *me); extern void xtables_register_targets(struct xtables_target *, unsigned int); +extern bool xtables_strtoul_base(const char *, char **, uintmax_t *, + uintmax_t, uintmax_t, unsigned int); extern bool xtables_strtoul(const char *, char **, uintmax_t *, uintmax_t, uintmax_t); extern bool xtables_strtoui(const char *, char **, unsigned int *, -- cgit v1.2.3