mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 05:31:28 +00:00
scst_main: Convert a goto statement into a loop
Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4504 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -442,12 +442,12 @@ void scst_unregister_target_template(struct scst_tgt_template *vtt)
|
||||
}
|
||||
#endif
|
||||
|
||||
restart:
|
||||
list_for_each_entry(tgt, &vtt->tgt_list, tgt_list_entry) {
|
||||
while (!list_empty(&vtt->tgt_list)) {
|
||||
tgt = list_first_entry(&vtt->tgt_list, typeof(*tgt),
|
||||
tgt_list_entry);
|
||||
mutex_unlock(&scst_mutex);
|
||||
scst_unregister_target(tgt);
|
||||
mutex_lock(&scst_mutex);
|
||||
goto restart;
|
||||
}
|
||||
|
||||
mutex_unlock(&scst_mutex);
|
||||
|
||||
Reference in New Issue
Block a user