diff --git a/components/net/at/at_socket/at_socket.c b/components/net/at/at_socket/at_socket.c index c21d019717..9575868116 100644 --- a/components/net/at/at_socket/at_socket.c +++ b/components/net/at/at_socket/at_socket.c @@ -248,7 +248,7 @@ static void at_do_event_changes(struct at_socket *sock, at_event_t event, rt_boo break; } default: - LOG_E("Not supported event (%d)", event) + LOG_E("Not supported event (%d)", event); } } diff --git a/components/net/at/src/at_client.c b/components/net/at/src/at_client.c index 42a6f4b980..6e9e3541fc 100644 --- a/components/net/at/src/at_client.c +++ b/components/net/at/src/at_client.c @@ -748,7 +748,7 @@ static int at_client_para_init(at_client_t client) client->recv_buffer = (char *) rt_calloc(1, client->recv_bufsz); if (client->recv_buffer == RT_NULL) { - LOG_E("AT client initialize failed! No memory for receive buffer.") + LOG_E("AT client initialize failed! No memory for receive buffer."); result = -RT_ENOMEM; goto __exit; } diff --git a/components/net/sal_socket/src/sal_socket.c b/components/net/sal_socket/src/sal_socket.c index c4b4afe900..351506756f 100644 --- a/components/net/sal_socket/src/sal_socket.c +++ b/components/net/sal_socket/src/sal_socket.c @@ -489,8 +489,7 @@ int sal_shutdown(int socket, int how) if (sock->ops->shutdown((int) sock->user_data, how) == 0) { rt_free(sock); - sock = RT_NULL; - + socket_table.sockets[socket] = RT_NULL; return 0; } @@ -697,9 +696,8 @@ int sal_closesocket(int socket) if (sock->ops->closesocket((int) sock->user_data) == 0) { - rt_free(sock); - sock = RT_NULL; - + rt_free(sock); + socket_table.sockets[socket] = RT_NULL; return 0; }