From 5f2922cfc0bbfbeb878f5c12e9fb3eb602ae5507 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 27 Jan 2009 18:43:01 +0100 Subject: libxtables: prefix/order - strtoui This commit also throws out the redundant string_to_number_*. Signed-off-by: Jan Engelhardt --- extensions/libipt_icmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions/libipt_icmp.c') diff --git a/extensions/libipt_icmp.c b/extensions/libipt_icmp.c index 7aff9caa..de4c3387 100644 --- a/extensions/libipt_icmp.c +++ b/extensions/libipt_icmp.c @@ -147,12 +147,12 @@ parse_icmp(const char *icmptype, u_int8_t *type, u_int8_t code[]) if (slash) *slash = '\0'; - if (string_to_number(buffer, 0, UINT8_MAX, &number) == -1) + if (!xtables_strtoui(buffer, NULL, &number, 0, UINT8_MAX)) exit_error(PARAMETER_PROBLEM, "Invalid ICMP type `%s'\n", buffer); *type = number; if (slash) { - if (string_to_number(slash+1, 0, UINT8_MAX, &number) == -1) + if (!xtables_strtoui(slash+1, NULL, &number, 0, UINT8_MAX)) exit_error(PARAMETER_PROBLEM, "Invalid ICMP code `%s'\n", slash+1); -- cgit v1.2.3