summaryrefslogtreecommitdiffstats
path: root/lib/tevent
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tevent')
-rw-r--r--lib/tevent/echo_server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tevent/echo_server.c b/lib/tevent/echo_server.c
index a1da0d801b..102f7b4da7 100644
--- a/lib/tevent/echo_server.c
+++ b/lib/tevent/echo_server.c
@@ -619,10 +619,10 @@ int main(int argc, const char **argv)
exit(1);
}
- memset(&addr, 0, sizeof(addr));
-
- addr.sin_family = AF_INET;
- addr.sin_port = htons(port);
+ addr = (struct sockaddr_in) {
+ .sin_family = AF_INET,
+ .sin_port = htons(port)
+ };
ret = bind(listen_sock, (struct sockaddr *)&addr, sizeof(addr));
if (ret == -1) {