lib: Save a few bytes of .text
authorVolker Lendecke <vl@samba.org>
Wed, 15 Nov 2017 12:12:05 +0000 (13:12 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 17 Nov 2017 23:09:16 +0000 (00:09 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/util_net.c

index 57db4fae4d81593a3ece0448a39575f4980d17f7..f0a30168342f2d17a80d3eb59c4fb4a19700e630 100644 (file)
@@ -36,9 +36,8 @@
 
 void zero_sockaddr(struct sockaddr_storage *pss)
 {
 
 void zero_sockaddr(struct sockaddr_storage *pss)
 {
-       ZERO_STRUCTP(pss);
        /* Ensure we're at least a valid sockaddr-storage. */
        /* Ensure we're at least a valid sockaddr-storage. */
-       pss->ss_family = AF_INET;
+       *pss = (struct sockaddr_storage) { .ss_family = AF_INET };
 }
 
 static char *normalize_ipv6_literal(const char *str, char *buf, size_t *_len)
 }
 
 static char *normalize_ipv6_literal(const char *str, char *buf, size_t *_len)