]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
get rid of use of exit()
authorRudolf Polzer <divverent@alientrap.org>
Mon, 4 Jun 2012 08:31:56 +0000 (10:31 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 4 Jun 2012 08:31:56 +0000 (10:31 +0200)
sys_linux.c

index 7cb28b6aa28de44945426210c9219eb60aa008f1..6e6afded36e35028c3a933119d0552226e1ae2f3 100644 (file)
@@ -153,10 +153,10 @@ void Sys_InitConsole (void)
 #  include <errno.h>
 # endif
 #endif
-static void anticheat_init(char **envp)
+static qboolean anticheat_init(char **envp)
 {
 #ifdef ANTICHEAT
-#define FAIL exit(42)
+#define FAIL return false
 
        // anti LD_PRELOAD
        // note that we're using envp here, so one doesn't simply hook into getenv()
@@ -254,11 +254,14 @@ static void anticheat_init(char **envp)
        }
 # endif
 #endif
+
+       return true;
 }
 
 int main (int argc, char **argv, char **envp)
 {
-       anticheat_init(envp);
+       if(!anticheat_init(envp))
+               return 42;
 
        signal(SIGFPE, SIG_IGN);