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:
zhanghongyu 2023-04-17 13:24:47 +08:00 committed by Xiang Xiao
parent eaff76284b
commit 03265caa7a

View File

@ -1823,11 +1823,9 @@ static ssize_t inet_sendto(FAR struct socket *psock, FAR const void *buf,
}
#ifdef CONFIG_NET_UDP
/* If this is a connected socket, then return EISCONN */
if (psock->s_type != SOCK_DGRAM)
{
nerr("ERROR: Connected socket\n");
nerr("ERROR: Inappropriate socket type %d\n", psock->s_type);
return -EBADF;
}