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/libxt_rateest.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'extensions/libxt_rateest.c') diff --git a/extensions/libxt_rateest.c b/extensions/libxt_rateest.c index 333239d9..285b7ba3 100644 --- a/extensions/libxt_rateest.c +++ b/extensions/libxt_rateest.c @@ -112,6 +112,7 @@ rateest_parse(int c, char **argv, int invert, unsigned int *flags, const void *entry, struct xt_entry_match **match) { struct xt_rateest_match_info *info = (void *)(*match)->data; + unsigned int val; rateest_info = info; @@ -186,10 +187,11 @@ rateest_parse(int c, char **argv, int invert, unsigned int *flags, if (!argv[optind] || *argv[optind] == '-' || *argv[optind] == '!') break; - if (string_to_number(argv[optind], 0, 0, &info->pps1) < 0) + if (!xtables_strtoui(argv[optind], NULL, &val, 0, UINT32_MAX)) exit_error(PARAMETER_PROBLEM, "rateest: could not parse pps `%s'", argv[optind]); + info->pps1 = val; optind++; break; @@ -234,10 +236,11 @@ rateest_parse(int c, char **argv, int invert, unsigned int *flags, if (!argv[optind] || *argv[optind] == '-' || *argv[optind] == '!') break; - if (string_to_number(argv[optind], 0, 0, &info->pps2) < 0) + if (!xtables_strtoui(argv[optind], NULL, &val, 0, UINT32_MAX)) exit_error(PARAMETER_PROBLEM, "rateest: could not parse pps `%s'", argv[optind]); + info->pps2 = val; optind++; break; -- cgit v1.2.3