From 5b996ab88097b82352fb84aab33f453737818a51 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 23 Sep 2010 08:53:40 +0200 Subject: output/httpd: access sockaddr_storage object directly Work around aliasing warning. --- src/output/httpd_output_plugin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/output/httpd_output_plugin.c') diff --git a/src/output/httpd_output_plugin.c b/src/output/httpd_output_plugin.c index 51ae820bc..bff56bf6b 100644 --- a/src/output/httpd_output_plugin.c +++ b/src/output/httpd_output_plugin.c @@ -213,9 +213,8 @@ httpd_listen_in_event(G_GNUC_UNUSED GIOChannel *source, fd = accept_cloexec_nonblock(httpd->fd, (struct sockaddr*)&sa, &sa_length); #ifdef HAVE_LIBWRAP - struct sockaddr *sa_p = (struct sockaddr *)&sa; - if (sa_p->sa_family != AF_UNIX) { - char *hostaddr = sockaddr_to_string(sa_p, sa_length, NULL); + if (sa.ss_family != AF_UNIX) { + char *hostaddr = sockaddr_to_string((const struct sockaddr *)&sa, sa_length, NULL); const char *progname = g_get_prgname(); struct request_info req; -- cgit v1.2.3