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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'extensions/libipt_TOS.c') diff --git a/extensions/libipt_TOS.c b/extensions/libipt_TOS.c index 0c91cb54..9feba060 100644 --- a/extensions/libipt_TOS.c +++ b/extensions/libipt_TOS.c @@ -60,10 +60,9 @@ init(struct ipt_entry_target *t, unsigned int *nfcache) static void parse_tos(const unsigned char *s, struct ipt_tos_target_info *info) { - unsigned int i; - int tos = string_to_number(s, 0, 255); + unsigned int i, 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