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_ECN.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extensions/libipt_ECN.c') diff --git a/extensions/libipt_ECN.c b/extensions/libipt_ECN.c index e9312f06..c4e8e34f 100644 --- a/extensions/libipt_ECN.c +++ b/extensions/libipt_ECN.c @@ -61,7 +61,7 @@ static int ECN_parse(int c, char **argv, int invert, unsigned int *flags, if (*flags & IPT_ECN_OP_SET_CWR) exit_error(PARAMETER_PROBLEM, "ECN target: Only use --ecn-tcp-cwr ONCE!"); - if (string_to_number(optarg, 0, 1, &result)) + if (!xtables_strtoui(optarg, NULL, &result, 0, 1)) exit_error(PARAMETER_PROBLEM, "ECN target: Value out of range"); einfo->operation |= IPT_ECN_OP_SET_CWR; @@ -72,7 +72,7 @@ static int ECN_parse(int c, char **argv, int invert, unsigned int *flags, if (*flags & IPT_ECN_OP_SET_ECE) exit_error(PARAMETER_PROBLEM, "ECN target: Only use --ecn-tcp-ece ONCE!"); - if (string_to_number(optarg, 0, 1, &result)) + if (!xtables_strtoui(optarg, NULL, &result, 0, 1)) exit_error(PARAMETER_PROBLEM, "ECN target: Value out of range"); einfo->operation |= IPT_ECN_OP_SET_ECE; @@ -83,7 +83,7 @@ static int ECN_parse(int c, char **argv, int invert, unsigned int *flags, if (*flags & IPT_ECN_OP_SET_IP) exit_error(PARAMETER_PROBLEM, "ECN target: Only use --ecn-ip-ect ONCE!"); - if (string_to_number(optarg, 0, 3, &result)) + if (!xtables_strtoui(optarg, NULL, &result, 0, 3)) exit_error(PARAMETER_PROBLEM, "ECN target: Value out of range"); einfo->operation |= IPT_ECN_OP_SET_IP; -- cgit v1.2.3