浏览代码

sh2 drc: bugfix in block management

kub 4 年之前
父节点
当前提交
b10a782a36
共有 1 个文件被更改,包括 2 次插入7 次删除
  1. 2 7
      cpu/sh2/compiler.c

+ 2 - 7
cpu/sh2/compiler.c

@@ -766,13 +766,8 @@ static void rm_from_block_lists(struct block_desc *block)
 
 static void rm_block_list(struct block_list **blist)
 {
-  struct block_list *next, *current = *blist;
-  while (current != NULL) {
-    next = current->next;
-    rm_from_block_lists(current->block);
-    current = next;
-  }
-  *blist = NULL;
+  while (*blist != NULL)
+    rm_from_block_lists((*blist)->block);
 }
 
 static void REGPARM(1) flush_tcache(int tcid)