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/libipt_ttl.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/libipt_ttl.c')
-rw-r--r-- | extensions/libipt_ttl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/libipt_ttl.c b/extensions/libipt_ttl.c index a8455e1d..1fa7bd31 100644 --- a/extensions/libipt_ttl.c +++ b/extensions/libipt_ttl.c @@ -33,7 +33,7 @@ static int ttl_parse(int c, char **argv, int invert, unsigned int *flags, switch (c) { case '2': - if (string_to_number(optarg, 0, UINT8_MAX, &value) == -1) + if (!xtables_strtoui(optarg, NULL, &value, 0, UINT8_MAX)) exit_error(PARAMETER_PROBLEM, "ttl: Expected value between 0 and 255"); @@ -46,7 +46,7 @@ static int ttl_parse(int c, char **argv, int invert, unsigned int *flags, info->ttl = value; break; case '3': - if (string_to_number(optarg, 0, UINT8_MAX, &value) == -1) + if (!xtables_strtoui(optarg, NULL, &value, 0, UINT8_MAX)) exit_error(PARAMETER_PROBLEM, "ttl: Expected value between 0 and 255"); @@ -58,7 +58,7 @@ static int ttl_parse(int c, char **argv, int invert, unsigned int *flags, info->ttl = value; break; case '4': - if (string_to_number(optarg, 0, UINT8_MAX, &value) == -1) + if (!xtables_strtoui(optarg, NULL, &value, 0, UINT8_MAX)) exit_error(PARAMETER_PROBLEM, "ttl: Expected value between 0 and 255"); |