projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0410950
)
fix bug whereby most atexit-registered functions got skipped
author
Rich Felker
<dalias@aerifal.cx>
Mon, 20 Aug 2012 00:48:16 +0000
(20:48 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Mon, 20 Aug 2012 00:48:16 +0000
(20:48 -0400)
src/exit/atexit.c
patch
|
blob
|
history
diff --git
a/src/exit/atexit.c
b/src/exit/atexit.c
index 1b40cb9b8f7e420109640438803035074a4135b8..c31f3dc35261ff6ddc73d9325463c86f117ec926 100644
(file)
--- a/
src/exit/atexit.c
+++ b/
src/exit/atexit.c
@@
-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;