diff options
author | Max Kellermann <max@duempel.org> | 2010-09-23 08:53:40 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-09-23 09:01:17 +0200 |
commit | 5b996ab88097b82352fb84aab33f453737818a51 (patch) | |
tree | 0684a1b932940bcbbe6df807da7980f242b55819 /src/output | |
parent | 635cfbae131b323b62ca50c6bffb0b801b57aafe (diff) | |
download | mpd-5b996ab88097b82352fb84aab33f453737818a51.tar.gz mpd-5b996ab88097b82352fb84aab33f453737818a51.tar.xz mpd-5b996ab88097b82352fb84aab33f453737818a51.zip |
output/httpd: access sockaddr_storage object directly
Work around aliasing warning.
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/httpd_output_plugin.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; |