From 4ddd115af8e6247788c78dc3630d37f2f4493e03 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 7 May 2012 08:27:28 +0200 Subject: Use (void) instead of () for functions without args (Thanks fernandotcl) See also: http://article.gmane.org/gmane.linux.kernel/1268792 The C compiler will handle (void) as "no arguments" and () as "variadic function" (equivalent to (...)) which might lead to subtle errors. --- src/print_ipv6_addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/print_ipv6_addr.c') diff --git a/src/print_ipv6_addr.c b/src/print_ipv6_addr.c index 21974f3..f987b59 100644 --- a/src/print_ipv6_addr.c +++ b/src/print_ipv6_addr.c @@ -64,7 +64,7 @@ static char *get_sockname(struct addrinfo *addr) { * Returns the IPv6 address with which you have connectivity at the moment. * The char * is statically allocated and mustn't be freed */ -static char *get_ipv6_addr() { +static char *get_ipv6_addr(void) { struct addrinfo hints; struct addrinfo *result, *resp; static struct addrinfo *cached = NULL; -- cgit v1.2.3