[crt] Fix atexit
authorcoderain <coderain@sdf.org>
Sat, 14 Oct 2017 15:41:13 +0000 (17:41 +0200)
committercoderain <coderain@sdf.org>
Sat, 14 Oct 2017 15:41:13 +0000 (17:41 +0200)
crt/src/exit.c

index 51b2fe7f7d83c8869656d47d78fb4aee62605bb6..0af3d524d81dd1f549eba6b01534320d4375fe96 100644 (file)
@@ -25,7 +25,7 @@ static int num_atexit_functions = 0;
 
 int atexit(void (*function)(void))
 {
-    if (num_atexit_functions == ATEXIT_MAX) return 1;
+    if (num_atexit_functions == ATEXIT_MAX) return -1;
     atexit_functions[num_atexit_functions++] = function;
     return 0;
 }