From 9ec30b27694f83442ca73d98cc149fdb151f67c4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 15 Oct 2018 13:55:00 +0200 Subject: [PATCH] socket-util: use structured initialization --- src/basic/socket-util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index df96aba970..47c2de8b6d 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -57,8 +57,9 @@ int socket_address_parse(SocketAddress *a, const char *s) { assert(a); assert(s); - zero(*a); - a->type = SOCK_STREAM; + *a = (SocketAddress) { + .type = SOCK_STREAM, + }; if (*s == '[') { uint16_t port; -- 2.25.1