]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CONTRIB: iprange: Fix compiler warning in iprange.c
authorRyan O'Hara <rohara@redhat.com>
Fri, 15 Dec 2017 16:21:29 +0000 (10:21 -0600)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Dec 2017 08:36:58 +0000 (09:36 +0100)
The declaration of main() in iprange.c did not specify a type, causing
a compiler warning [-Wimplicit-int]. This patch simply declares main()
to be type 'int' and calls exit(0) at the end of the function.

contrib/iprange/iprange.c

index 91690c77e95a2a206ed2b5c91826400945cf9f58..abae00761eeb809f48aa52a69993af9a956ae63e 100644 (file)
@@ -111,7 +111,7 @@ static void usage(const char *argv0)
                "\n", argv0);
 }
 
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
        char line[MAXLINE];
        int l, lnum;
@@ -198,4 +198,5 @@ main(int argc, char **argv)
                        convert_range(sa, da, he, NULL);
                }
        }
+       exit(0);
 }