Browse Source

a trap from a routine called by the termination sequence could
cause an infinite loop. This is prevented

ceriel 35 years ago
parent
commit
74d51b5d97
1 changed files with 2 additions and 4 deletions
  1. 2 4
      lang/m2/libm2/halt.c

+ 2 - 4
lang/m2/libm2/halt.c

@@ -15,10 +15,8 @@ static int (*proclist[MAXPROCS])();
 
 _cleanup()
 {
-	register int i;
-
-	for (i = callindex; --i >= 0;) {
-		(*proclist[i])();
+	while (--callindex >= 0)
+		(*proclist[callindex])();
 	}
 	callindex = 0;
 }