summaryrefslogtreecommitdiffstats
path: root/iptables.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 /iptables.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 'iptables.c')
-rw-r--r--iptables.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iptables.c b/iptables.c
index 07ace197..15b5b6f4 100644
--- a/iptables.c
+++ b/iptables.c
@@ -488,7 +488,7 @@ find_proto(const char *pname, enum xtables_tryload tryload,
{
unsigned int proto;
- if (string_to_number(pname, 0, UINT8_MAX, &proto) != -1) {
+ if (xtables_strtoui(pname, NULL, &proto, 0, UINT8_MAX)) {
char *protoname = proto_to_name(proto, nolookup);
if (protoname)
@@ -504,7 +504,7 @@ parse_protocol(const char *s)
{
unsigned int proto;
- if (string_to_number(s, 0, UINT8_MAX, &proto) == -1) {
+ if (!xtables_strtoui(s, NULL, &proto, 0, UINT8_MAX)) {
struct protoent *pent;
/* first deal with the special case of 'all' to prevent
@@ -542,7 +542,7 @@ parse_rulenumber(const char *rule)
{
unsigned int rulenum;
- if (string_to_number(rule, 1, INT_MAX, &rulenum) == -1)
+ if (!xtables_strtoui(rule, NULL, &rulenum, 1, INT_MAX))
exit_error(PARAMETER_PROBLEM,
"Invalid rule number `%s'", rule);