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

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

commit 0c7f8204fdd8cf2963e84b41f8cfad6b88217cbb
Author: zhanghongyu <[email protected]>
AuthorDate: Mon Apr 13 14:36:03 2026 +0800

    net/icmp: use break instead of return in icmp_findconn
    
    Replace return with break inside the loop in icmp_findconn() to
    ensure any post-loop cleanup logic is properly executed before
    returning.
    
    Signed-off-by: zhanghongyu <[email protected]>
---
 net/icmp/icmp_conn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/icmp/icmp_conn.c b/net/icmp/icmp_conn.c
index 9f6719e5d4d..ec877d3eab1 100644
--- a/net/icmp/icmp_conn.c
+++ b/net/icmp/icmp_conn.c
@@ -241,7 +241,7 @@ FAR struct icmp_conn_s *icmp_findconn(FAR struct 
net_driver_s *dev,
     {
       if (conn->id == id && conn->dev == dev)
         {
-          return conn;
+          break;
         }
     }
 

Reply via email to