From 03265caa7adb1c66f540dfed6a8cc681589db655 Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Mon, 17 Apr 2023 13:24:47 +0800 Subject: [PATCH] inet_sendto: correct error messages and remove the comment Comment information and printing do not match the actual function. Signed-off-by: zhanghongyu --- net/inet/inet_sockif.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c index 3b858807971..2f63f94751e 100644 --- a/net/inet/inet_sockif.c +++ b/net/inet/inet_sockif.c @@ -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; }