From 9d16d0c7d0b05e3ff278c3c95e1f2f871f348dd3 Mon Sep 17 00:00:00 2001 From: Daniel Buch Date: Wed, 12 Mar 2014 20:09:25 +0100 Subject: [PATCH] socket.c: make use of union sockaddr_union --- src/core/socket.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/core/socket.c b/src/core/socket.c index 35531ed..8ecc9f9 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -597,13 +597,7 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) { static int instance_from_socket(int fd, unsigned nr, char **instance) { socklen_t l; char *r; - union { - struct sockaddr sa; - struct sockaddr_un un; - struct sockaddr_in in; - struct sockaddr_in6 in6; - struct sockaddr_storage storage; - } local, remote; + union sockaddr_union local, remote; assert(fd >= 0); assert(instance); -- 2.7.4