diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-01-27 18:43:01 +0100 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2009-01-27 23:14:30 +0100 |
commit | 5f2922cfc0bbfbeb878f5c12e9fb3eb602ae5507 (patch) | |
tree | d0fc6078218d3729279e0d47d3a766fcffdeab9d /extensions/libxt_rateest.c | |
parent | 39bf9c8214d3073a496a8a1eff91046a8d6fbbdf (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/libxt_rateest.c')
-rw-r--r-- | extensions/libxt_rateest.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; |