r14847: Tell static checkers that exit_server() doesn't
authorJeremy Allison <jra@samba.org>
Sat, 1 Apr 2006 05:41:34 +0000 (05:41 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:15:50 +0000 (11:15 -0500)
return.
Jeremy.

source/include/includes.h
source/smbd/server.c

index e02a981d56ae607637cdae8aac71dc3365a0fba6..620af59db709da9dfe939ec5771f6c46900d0bdd 100644 (file)
@@ -1562,4 +1562,5 @@ LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);
 #endif
 
 void smb_panic( const char *why ) NORETURN_ATTRIBUTE ;
+void exit_server(const char *reason) NORETURN_ATTRIBUTE ;
 #endif /* _INCLUDES_H */
index 5da73046a123307ca669dd86b76c2765d59a9fa8..4d737d28498ba28e3e9067b6cd1cd15eeafbf852 100644 (file)
@@ -570,10 +570,14 @@ BOOL reload_services(BOOL test)
 
 
 #if DUMP_CORE
+
+static void dump_core(void) NORETURN_ATTRIBUTE ;
+
 /*******************************************************************
 prepare to dump a core file - carefully!
 ********************************************************************/
-static BOOL dump_core(void)
+
+static void dump_core(void)
 {
        char *p;
        pstring dname;
@@ -584,7 +588,9 @@ static BOOL dump_core(void)
        mkdir(dname,0700);
        sys_chown(dname,getuid(),getgid());
        chmod(dname,0700);
-       if (chdir(dname)) return(False);
+       if (chdir(dname)) {
+               abort();
+       }
        umask(~(0700));
 
 #ifdef HAVE_GETRLIMIT
@@ -608,7 +614,6 @@ static BOOL dump_core(void)
        CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL);
 #endif
        abort();
-       return(True);
 }
 #endif
 
@@ -616,7 +621,7 @@ static BOOL dump_core(void)
  Exit the server.
 ****************************************************************************/
 
-void exit_server(const char *reason)
+ void exit_server(const char *reason)
 {
        static int firsttime=1;
 
@@ -659,7 +664,7 @@ void exit_server(const char *reason)
                DEBUGLEVEL = oldlevel;
                DEBUG(0,("===============================================================\n"));
 #if DUMP_CORE
-               if (dump_core()) return;
+               dump_core();
 #endif
        }