Skip to content

Commit 31a4068

Browse files
committed
apply Copilot review
1 parent 591152b commit 31a4068

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolResolve.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -561,13 +561,13 @@ private static void cancelCallStackList(CobolCallStackList p) {
561561
// 子プログラムを再帰的にキャンセル
562562
if (p.getChildren() != null) {
563563
cancelCallStackList(p.getChildren());
564+
p.setChildren(null);
564565
}
565566

566567
// 兄弟要素を再帰的にキャンセル
567-
CobolCallStackList s = p.getSister();
568-
while (s != null) {
569-
cancelCallStackList(s);
570-
s = s.getSister();
568+
if (p.getSister() != null) {
569+
cancelCallStackList(p.getSister());
570+
p.setSister(null);
571571
}
572572
}
573573

@@ -609,7 +609,7 @@ public static void pushCallStackList(String name) {
609609
p = p.getSister();
610610
}
611611

612-
currentCallStackList.setSister(createCallStackList(name));
612+
p.setSister(createCallStackList(name));
613613
}
614614

615615
/**

0 commit comments

Comments
 (0)