From: Andre Noll Date: Fri, 10 Jun 2011 14:03:30 +0000 (+0200) Subject: net.c: Use proper socket type for __get_sock_name(). X-Git-Tag: v0.4.8~27^2~1 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=a1a7eeae4f3814f8244de16cd3fcf6b5bcab066e;p=paraslash.git net.c: Use proper socket type for __get_sock_name(). This patch gets rid of net.c:652:33: warning: incompatible pointer types passing 'int (int, __SOCKADDR_ARG, socklen_t *restrict)', expected 'int (*)(int, struct sockaddr *, socklen_t *)' [-pedantic] return __get_sock_name(sockfd, getsockname); ^~~~~~~~~~~ when compiling with clang. --- diff --git a/net.c b/net.c index 2f720b10..ae596e5a 100644 --- a/net.c +++ b/net.c @@ -607,8 +607,7 @@ int generic_max_transport_msg_size(int sockfd) * \sa getsockname(2), getpeername(2), parse_url(), getnameinfo(3), * services(5), nsswitch.conf(5). */ -static char *__get_sock_name(int fd, int (*getname)(int, struct sockaddr*, - socklen_t *)) +static char *__get_sock_name(int fd, typeof(getsockname) getname) { struct sockaddr_storage ss; const struct sockaddr *sa;