output/httpd: access sockaddr_storage object directly

Work around aliasing warning.
This commit is contained in:
Max Kellermann 2010-09-23 08:53:40 +02:00
parent 635cfbae13
commit 5b996ab880

View File

@ -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;