This is an automated email from the ASF dual-hosted git repository.

linguini pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 49ffd94d840 net/pkt: Fix coverity issue
49ffd94d840 is described below

commit 49ffd94d840020da5f290dbd343f341ac360d5d0
Author: zhangshuai39 <[email protected]>
AuthorDate: Thu May 15 11:02:18 2025 +0800

    net/pkt: Fix coverity issue
    
    The value ret is overwritten after being assigned a value.
    
    Signed-off-by: zhangshuai39 <[email protected]>
---
 net/pkt/pkt_recvmsg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/pkt/pkt_recvmsg.c b/net/pkt/pkt_recvmsg.c
index 57cf3471de1..efe48051c7e 100644
--- a/net/pkt/pkt_recvmsg.c
+++ b/net/pkt/pkt_recvmsg.c
@@ -499,7 +499,7 @@ ssize_t pkt_recvmsg(FAR struct socket *psock, FAR struct 
msghdr *msg,
   if (psock->s_type != SOCK_DGRAM && psock->s_type != SOCK_RAW)
     {
       nerr("ERROR: Unsupported socket type: %d\n", psock->s_type);
-      ret = -ENOSYS;
+      return -ENOSYS;
     }
 
   /* Get the device driver that will service this transfer */

Reply via email to