socket-util: use structured initialization
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Oct 2018 11:55:00 +0000 (13:55 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Oct 2018 17:35:00 +0000 (19:35 +0200)
src/basic/socket-util.c

index df96aba..47c2de8 100644 (file)
@@ -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;