From: Harald Welte Date: Thu, 13 Sep 2001 13:46:46 +0000 (+0000) Subject: another string_to_number fix X-Git-Tag: v1.2.4~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e143b910468734512017d0900673a4ca600931e2;p=thirdparty%2Fiptables.git another string_to_number fix --- diff --git a/extensions/libip6t_length.c b/extensions/libip6t_length.c index 101213e8..a78572f9 100644 --- a/extensions/libip6t_length.c +++ b/extensions/libip6t_length.c @@ -35,12 +35,10 @@ init(struct ip6t_entry_match *m, unsigned int *nfcache) static u_int16_t parse_length(const char *s) -{ + int len; - len = string_to_number(s, 0, 0xFFFF); - - if (len == -1) + if (string_to_number(s, 0, 0xFFFF, &len) == -1) exit_error(PARAMETER_PROBLEM, "length invalid: `%s'\n", s); else return (u_int16_t )len;