aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/output/httpd_output_plugin.c5
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;