提交 a749ba3a 编写于 作者: R Rich Felker

fix bug whereby most atexit-registered functions got skipped

上级 04109502
......@@ -21,9 +21,8 @@ void __funcs_on_exit()
int i;
void (*func)(void *), *arg;
LOCK(lock);
for (; head; head=head->next) {
for (i=COUNT-1; i>=0 && !head->f[i]; i--);
if (i<0) continue;
for (; head; head=head->next) for (i=COUNT-1; i>=0; i--) {
if (!head->f[i]) continue;
func = head->f[i];
arg = head->a[i];
head->f[i] = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册