diff options
author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 01:19:23 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 01:19:23 -0500 |
commit | 0f649efceacd8f9eb921d5765dfa73b0771b1fcd (patch) | |
tree | faadaeae5c3277435d97650fcc22be5203e17c35 /src/stdlib/exit.c | |
parent | 28a7e3dfb4ca2bd407508ef789bf1859acd9b969 (diff) |
use a single variable for tracking exit calls
Diffstat (limited to 'src/stdlib/exit.c')
-rw-r--r-- | src/stdlib/exit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stdlib/exit.c b/src/stdlib/exit.c index cd3175d6..42af83c7 100644 --- a/src/stdlib/exit.c +++ b/src/stdlib/exit.c @@ -14,13 +14,13 @@ _Noreturn void exit(int status) SIGNAL_SAFE(0); - if (__stdlib.quick_exit_called) { + if (__stdlib.exit_called == QUICK) { __stdlib.constraint_handler("Undefined behavior: exit() called after quick_exit()", NULL, 0); } - if (__stdlib.exit_called) { + if (__stdlib.exit_called == REGULAR) { __stdlib.constraint_handler("Undefined behavior: exit() called twice", NULL, 0); } - __stdlib.exit_called = 1; + __stdlib.exit_called = REGULAR; /* execute all atexit() registered functions in reverse order */ while (ae) { |