From e917bca09924435f3fca23c01042543b1826c81e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 27 Jan 2009 18:14:21 +0100 Subject: extensions: use UINT_MAX constants over open-coded numbers (2/2) Use the handy constants for ranges. Signed-off-by: Jan Engelhardt --- extensions/libipt_ttl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extensions/libipt_ttl.c') diff --git a/extensions/libipt_ttl.c b/extensions/libipt_ttl.c index 055c92ee..a8455e1d 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, 255, &value) == -1) + if (string_to_number(optarg, 0, UINT8_MAX, &value) == -1) 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, 255, &value) == -1) + if (string_to_number(optarg, 0, UINT8_MAX, &value) == -1) 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, 255, &value) == -1) + if (string_to_number(optarg, 0, UINT8_MAX, &value) == -1) exit_error(PARAMETER_PROBLEM, "ttl: Expected value between 0 and 255"); -- cgit v1.2.3