mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
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 <zhanghongyu@xiaomi.com>
This commit is contained in:
committed by
Alan C. Assis
parent
a0b8969636
commit
0c7f8204fd
@@ -241,7 +241,7 @@ FAR struct icmp_conn_s *icmp_findconn(FAR struct net_driver_s *dev,
|
|||||||
{
|
{
|
||||||
if (conn->id == id && conn->dev == dev)
|
if (conn->id == id && conn->dev == dev)
|
||||||
{
|
{
|
||||||
return conn;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user