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:
Vladislav Bolkhovitin
2012-09-04 00:02:17 +00:00
parent 2ebba41f55
commit e46be66d79

View File

@@ -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);