public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2eaca39
)
Call atexit handlers properly, avoiding a NPE and seg fault every time a
author
David Given
<dg@cowlark.com>
Sun, 9 Sep 2018 16:51:00 +0000
(18:51 +0200)
committer
David Given
<dg@cowlark.com>
Sun, 9 Sep 2018 16:51:00 +0000
(18:51 +0200)
program exits.
lang/cem/libcc.ansi/sys/exit/exit.c
patch
|
blob
|
history
diff --git
a/lang/cem/libcc.ansi/sys/exit/exit.c
b/lang/cem/libcc.ansi/sys/exit/exit.c
index
7f86132
..
d16db6c
100644
(file)
--- a/
lang/cem/libcc.ansi/sys/exit/exit.c
+++ b/
lang/cem/libcc.ansi/sys/exit/exit.c
@@
-15,8
+15,8
@@
int __funccnt = 0;
void exit(int status)
{
/* "Called in reversed order of their registration" */
- while (__funccnt
>= 0
)
- (*__functab[__funccnt])();
+ while (__funccnt)
+ (*__functab[
--
__funccnt])();
_exit(status);
}