summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_CLUSTERIP.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-01-27 18:43:01 +0100
committerJan Engelhardt <jengelh@medozas.de>2009-01-27 23:14:30 +0100
commit5f2922cfc0bbfbeb878f5c12e9fb3eb602ae5507 (patch)
treed0fc6078218d3729279e0d47d3a766fcffdeab9d /extensions/libipt_CLUSTERIP.c
parent39bf9c8214d3073a496a8a1eff91046a8d6fbbdf (diff)
libxtables: prefix/order - strtoui
This commit also throws out the redundant string_to_number_*. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions/libipt_CLUSTERIP.c')
-rw-r--r--extensions/libipt_CLUSTERIP.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/libipt_CLUSTERIP.c b/extensions/libipt_CLUSTERIP.c
index e93290ac..38909ea4 100644
--- a/extensions/libipt_CLUSTERIP.c
+++ b/extensions/libipt_CLUSTERIP.c
@@ -120,7 +120,7 @@ static int CLUSTERIP_parse(int c, char **argv, int invert, unsigned int *flags,
exit_error(PARAMETER_PROBLEM, "Can only specify node number combined with `--new'\n");
if (*flags & PARAM_TOTALNODE)
exit_error(PARAMETER_PROBLEM, "Can only specify total node number once\n");
- if (string_to_number(optarg, 1, CLUSTERIP_MAX_NODES, &num) < 0)
+ if (!xtables_strtoui(optarg, NULL, &num, 1, CLUSTERIP_MAX_NODES))
exit_error(PARAMETER_PROBLEM, "Unable to parse `%s'\n", optarg);
cipinfo->num_total_nodes = num;
*flags |= PARAM_TOTALNODE;
@@ -130,7 +130,7 @@ static int CLUSTERIP_parse(int c, char **argv, int invert, unsigned int *flags,
exit_error(PARAMETER_PROBLEM, "Can only specify node number combined with `--new'\n");
if (*flags & PARAM_LOCALNODE)
exit_error(PARAMETER_PROBLEM, "Can only specify local node number once\n");
- if (string_to_number(optarg, 1, CLUSTERIP_MAX_NODES, &num) < 0)
+ if (!xtables_strtoui(optarg, NULL, &num, 1, CLUSTERIP_MAX_NODES))
exit_error(PARAMETER_PROBLEM, "Unable to parse `%s'\n", optarg);
cipinfo->num_local_nodes = 1;
cipinfo->local_nodes[0] = num;
@@ -141,7 +141,7 @@ static int CLUSTERIP_parse(int c, char **argv, int invert, unsigned int *flags,
exit_error(PARAMETER_PROBLEM, "Can only specify hash init value combined with `--new'\n");
if (*flags & PARAM_HASHINIT)
exit_error(PARAMETER_PROBLEM, "Can specify hash init value only once\n");
- if (string_to_number(optarg, 0, UINT_MAX, &num) < 0)
+ if (!xtables_strtoui(optarg, NULL, &num, 0, UINT_MAX))
exit_error(PARAMETER_PROBLEM, "Unable to parse `%s'\n", optarg);
cipinfo->hash_initval = num;
*flags |= PARAM_HASHINIT;