diff options
Diffstat (limited to 'src/exit/at_quick_exit.c')
-rw-r--r-- | src/exit/at_quick_exit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/exit/at_quick_exit.c b/src/exit/at_quick_exit.c index 34541bad..ac28dfd9 100644 --- a/src/exit/at_quick_exit.c +++ b/src/exit/at_quick_exit.c @@ -21,9 +21,10 @@ void __funcs_on_quick_exit() int at_quick_exit(void (*func)(void)) { - if (count == 32) return -1; + int r = 0; LOCK(lock); - funcs[count++] = func; + if (count == 32) r = -1; + else funcs[count++] = func; UNLOCK(lock); - return 0; + return r; } |