From b47197629735fa1cb93112dfd7d1c4fbcdb24a95 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 23 Jul 2001 02:14:22 +0000 Subject: further fixes of string_to_number fixes --- extensions/libipt_tos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions/libipt_tos.c') diff --git a/extensions/libipt_tos.c b/extensions/libipt_tos.c index ec83e18d..f1d3b2a6 100644 --- a/extensions/libipt_tos.c +++ b/extensions/libipt_tos.c @@ -57,9 +57,9 @@ static void parse_tos(const unsigned char *s, struct ipt_tos_info *info) { unsigned int i; - int tos = string_to_number(s, 0, 255); + unsigned int tos; - if (tos != -1) { + if (string_to_number(s, 0, 255, &tos) != -1) { if (tos == IPTOS_LOWDELAY || tos == IPTOS_THROUGHPUT || tos == IPTOS_RELIABILITY -- cgit v1.2.3