inet_sendto: correct error messages and remove the comment
Comment information and printing do not match the actual function. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
eaff76284b
commit
03265caa7a
@ -1823,11 +1823,9 @@ static ssize_t inet_sendto(FAR struct socket *psock, FAR const void *buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NET_UDP
|
#ifdef CONFIG_NET_UDP
|
||||||
/* If this is a connected socket, then return EISCONN */
|
|
||||||
|
|
||||||
if (psock->s_type != SOCK_DGRAM)
|
if (psock->s_type != SOCK_DGRAM)
|
||||||
{
|
{
|
||||||
nerr("ERROR: Connected socket\n");
|
nerr("ERROR: Inappropriate socket type %d\n", psock->s_type);
|
||||||
return -EBADF;
|
return -EBADF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user