diff options
| author | shandianchengzi <[email protected]> | 2023-05-18 22:42:44 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-18 10:42:44 -0400 |
| commit | a294d7da9a9be335dd8bae8bf688ce88fa58a83f (patch) | |
| tree | 0b7c21221e70be410523a04a3891ad70650fabe3 /examples/network/tcpserver.c | |
| parent | c349fe68b8046a54aa33cdfd7471a6e2effe7cae (diff) | |
[HUST CSE][example] fix some typo bugs about 'sucess' and others. (#7528)
Diffstat (limited to 'examples/network/tcpserver.c')
| -rw-r--r-- | examples/network/tcpserver.c | 12 |
1 files changed, 6 insertions, 6 deletions
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."); } } } |
