]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
net.c: Use proper socket type for __get_sock_name().
authorAndre Noll <maan@systemlinux.org>
Fri, 10 Jun 2011 14:03:30 +0000 (16:03 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 6 Jul 2011 08:05:06 +0000 (10:05 +0200)
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.

net.c

diff --git a/net.c b/net.c
index 2f720b10477aee8214cac5a5223ca4378b29bd5f..ae596e5a7007260dd3a2954932f3927e88ea3bdd 100644 (file)
--- 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;