From ae3e1d8ec563010f508a9b9aa5b9f98dbaca865a Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Wed, 19 Oct 2022 23:15:03 +0800 Subject: [PATCH] setsockopt: Change return errno to EFAULT when value is NULL behavior alignment to Linux for some testsuite Signed-off-by: zhanghongyu --- net/socket/setsockopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/socket/setsockopt.c b/net/socket/setsockopt.c index ab2345f5a3..3825e6fdda 100644 --- a/net/socket/setsockopt.c +++ b/net/socket/setsockopt.c @@ -82,7 +82,7 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option, if (!value) { - return -EINVAL; + return -EFAULT; } /* Process the options always handled locally */