mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity: 62574: wsi mux close: dumb down iterator so no dead code
This commit is contained in:
parent
cc5fb48598
commit
76ee92afb4
1 changed files with 4 additions and 3 deletions
|
@ -1150,11 +1150,13 @@ void
|
|||
lws_wsi_mux_close_children(struct lws *wsi, int reason)
|
||||
{
|
||||
struct lws *wsi2;
|
||||
struct lws **w;
|
||||
|
||||
if (!wsi->mux.child_list)
|
||||
return;
|
||||
|
||||
lws_start_foreach_llp(struct lws **, w, wsi->mux.child_list) {
|
||||
w = &wsi->mux.child_list;
|
||||
while (*w) {
|
||||
lwsl_info(" closing child %p\n", *w);
|
||||
/* disconnect from siblings */
|
||||
wsi2 = (*w)->mux.sibling_list;
|
||||
|
@ -1163,8 +1165,7 @@ lws_wsi_mux_close_children(struct lws *wsi, int reason)
|
|||
(*w)->socket_is_permanently_unusable = 1;
|
||||
__lws_close_free_wsi(*w, reason, "mux child recurse");
|
||||
*w = wsi2;
|
||||
continue;
|
||||
} lws_end_foreach_llp(w, mux.sibling_list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue