mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
netlib: Replace perror with nerr
Use the nerr interface for error print. Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
This commit is contained in:
parent
faefee4897
commit
11c8220fd5
1 changed files with 3 additions and 3 deletions
|
|
@ -224,7 +224,7 @@ int netlib_check_httpconnectivity(FAR const char *host,
|
|||
ret = connect(sock, (struct sockaddr *)&server_addr, sizeof(server_addr));
|
||||
if (ret < 0)
|
||||
{
|
||||
perror("Connection failed");
|
||||
nerr("Connection failed: %s", strerror(errno));
|
||||
goto exit_with_socket;
|
||||
}
|
||||
|
||||
|
|
@ -235,13 +235,13 @@ int netlib_check_httpconnectivity(FAR const char *host,
|
|||
ret = send(sock, buf, strlen(buf), 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
perror("send failed");
|
||||
nerr("send failed: %s", strerror(errno));
|
||||
goto exit_with_socket;
|
||||
}
|
||||
|
||||
if ((ret = recv(sock, buf, sizeof(buf), 0)) < 0)
|
||||
{
|
||||
perror("recv failed");
|
||||
nerr("recv failed: %s", strerror(errno));
|
||||
goto exit_with_socket;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue