From 037ef1f51f83622f25988820e35497b6989f60b6 Mon Sep 17 00:00:00 2001 From: David Lin Date: Tue, 5 Jan 2021 18:32:25 +0800 Subject: [PATCH] Update net_test.c clear the server_addr.sin_zero to '0'. --- examples/test/net_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/test/net_test.c b/examples/test/net_test.c index 553305f4d0..ec5d50197d 100644 --- a/examples/test/net_test.c +++ b/examples/test/net_test.c @@ -217,7 +217,7 @@ void tcpecho_socket_entry(void *parameter) server_addr.sin_family = AF_INET; server_addr.sin_port = htons(TCP_SOCKET_ECHO_PORT); server_addr.sin_addr.s_addr = INADDR_ANY; - rt_memset(&(server_addr.sin_zero),8, sizeof(server_addr.sin_zero)); + rt_memset(&(server_addr.sin_zero),0, sizeof(server_addr.sin_zero)); /* bind to server address */ if (bind(sock, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) == -1)