diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-01-27 18:14:21 +0100 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2009-01-27 23:14:29 +0100 |
commit | e917bca09924435f3fca23c01042543b1826c81e (patch) | |
tree | 4af388f40ddf885f17fa3e8fe791b3f9affd2a14 /extensions/libipt_icmp.c | |
parent | a80975497968e69b23f56bf15d346c65bec381f2 (diff) | |
download | platform_external_iptables-e917bca09924435f3fca23c01042543b1826c81e.tar.gz platform_external_iptables-e917bca09924435f3fca23c01042543b1826c81e.tar.bz2 platform_external_iptables-e917bca09924435f3fca23c01042543b1826c81e.zip |
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 'extensions/libipt_icmp.c')
-rw-r--r-- | extensions/libipt_icmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/libipt_icmp.c b/extensions/libipt_icmp.c index fa5a5409..7aff9caa 100644 --- a/extensions/libipt_icmp.c +++ b/extensions/libipt_icmp.c @@ -147,12 +147,12 @@ parse_icmp(const char *icmptype, u_int8_t *type, u_int8_t code[]) if (slash) *slash = '\0'; - if (string_to_number(buffer, 0, 255, &number) == -1) + if (string_to_number(buffer, 0, UINT8_MAX, &number) == -1) exit_error(PARAMETER_PROBLEM, "Invalid ICMP type `%s'\n", buffer); *type = number; if (slash) { - if (string_to_number(slash+1, 0, 255, &number) == -1) + if (string_to_number(slash+1, 0, UINT8_MAX, &number) == -1) exit_error(PARAMETER_PROBLEM, "Invalid ICMP code `%s'\n", slash+1); |