]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
another string_to_number fix
authorHarald Welte <laforge@gnumonks.org>
Thu, 13 Sep 2001 13:46:46 +0000 (13:46 +0000)
committerHarald Welte <laforge@gnumonks.org>
Thu, 13 Sep 2001 13:46:46 +0000 (13:46 +0000)
extensions/libip6t_length.c

index 101213e8cdf8e93304591466a4fd33f73646416e..a78572f99a68c32922a84032935b07587d23a2dd 100644 (file)
@@ -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;