]> git.tue.mpg.de Git - paraslash.git/commitdiff
Fix gcc-warning on Solaris.
authorAndre Noll <maan@systemlinux.org>
Mon, 7 Jan 2008 16:20:49 +0000 (17:20 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 7 Jan 2008 16:20:49 +0000 (17:20 +0100)
net.c:334: warning: missing braces around initializer

net.c

diff --git a/net.c b/net.c
index 7f8d596d7d648511aa6478db75bc706159874be0..674b8c646aa8300419e138c22724c651c6271b93 100644 (file)
--- a/net.c
+++ b/net.c
@@ -331,7 +331,7 @@ char *remote_name(int sockfd)
  */
 struct in_addr extract_v4_addr(const struct sockaddr_storage *ss)
 {
-       struct in_addr ia = { 0 };
+       struct in_addr ia = {.s_addr = 0};
 
        if (ss->ss_family == AF_INET)
                 ia.s_addr = ((struct sockaddr_in *)ss)->sin_addr.s_addr;