diff options
Diffstat (limited to 'sample/hello-world.c')
-rw-r--r-- | sample/hello-world.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sample/hello-world.c b/sample/hello-world.c index 2023cd6c6aa6..a13e06af612d 100644 --- a/sample/hello-world.c +++ b/sample/hello-world.c @@ -42,7 +42,7 @@ main(int argc, char **argv) struct evconnlistener *listener; struct event *signal_event; - struct sockaddr_in sin; + struct sockaddr_in sin = {0}; #ifdef _WIN32 WSADATA wsa_data; WSAStartup(0x0201, &wsa_data); @@ -54,7 +54,6 @@ main(int argc, char **argv) return 1; } - memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_port = htons(PORT); |