summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-01-27 18:14:21 +0100
committerJan Engelhardt <jengelh@medozas.de>2009-01-27 23:14:29 +0100
commite917bca09924435f3fca23c01042543b1826c81e (patch)
tree4af388f40ddf885f17fa3e8fe791b3f9affd2a14 /iptables.c
parenta80975497968e69b23f56bf15d346c65bec381f2 (diff)
extensions: use UINT_MAX constants over open-coded numbers (2/2)
Use the handy constants for ranges. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'iptables.c')
-rw-r--r--iptables.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables.c b/iptables.c
index b75df871..2b5a82ee 100644
--- a/iptables.c
+++ b/iptables.c
@@ -486,7 +486,7 @@ find_proto(const char *pname, enum ipt_tryload tryload, int nolookup, struct ipt
{
unsigned int proto;
- if (string_to_number(pname, 0, 255, &proto) != -1) {
+ if (string_to_number(pname, 0, UINT8_MAX, &proto) != -1) {
char *protoname = proto_to_name(proto, nolookup);
if (protoname)
@@ -502,7 +502,7 @@ parse_protocol(const char *s)
{
unsigned int proto;
- if (string_to_number(s, 0, 255, &proto) == -1) {
+ if (string_to_number(s, 0, UINT8_MAX, &proto) == -1) {
struct protoent *pent;
/* first deal with the special case of 'all' to prevent