From a294d7da9a9be335dd8bae8bf688ce88fa58a83f Mon Sep 17 00:00:00 2001 From: shandianchengzi <58585665+shandianchengzi@users.noreply.github.com> Date: Thu, 18 May 2023 22:42:44 +0800 Subject: [HUST CSE][example] fix some typo bugs about 'sucess' and others. (#7528) --- examples/network/tcpserver.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/network/tcpserver.c') diff --git a/examples/network/tcpserver.c b/examples/network/tcpserver.c index ff89595c15..6ec5f0e7a3 100644 --- a/examples/network/tcpserver.c +++ b/examples/network/tcpserver.c @@ -106,7 +106,7 @@ static void tcpserv(void *arg) /* Accept a request from client and the function is blocking */ /* 接受一个客户端连接socket的请求,这个函数调用是阻塞式的 */ connected = accept(sock, (struct sockaddr *)&client_addr, &sin_size); - /* Return the socket connected sucessfully */ + /* Return the socket connected successfully */ /* 返回的是连接成功的socket */ if (connected < 0) { @@ -139,13 +139,13 @@ static void tcpserv(void *arg) } else if (bytes_received == 0) { - /* Print warning message when recv function return 0 */ + /* Print warning message when recv function returns 0 */ /* 打印recv函数返回值为0的警告信息 */ - LOG_W("Received warning, recv function return 0."); + LOG_W("Received warning, recv function returns 0."); continue; } else - { /* Receive data sucessfully and append '\0' at the end of message */ + { /* Receive data successfully and append '\0' at the end of message */ /* 有接收到数据,把末端清零 */ recv_data[bytes_received] = '\0'; if (strcmp(recv_data, "q") == 0 || strcmp(recv_data, "Q") == 0) @@ -184,9 +184,9 @@ static void tcpserv(void *arg) } else if (ret == 0) { - /* Print warning message when send function return 0 */ + /* Print warning message when send function returns 0 */ /* 打印send函数返回值为0的警告信息 */ - LOG_W("Send warning, send function return 0."); + LOG_W("Send warning, send function returns 0."); } } } -- cgit v1.3.1