summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-04-01 05:41:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:50 -0500
commitecc0c18889cb3d844310fb91130680df22663a31 (patch)
treeceac07aee11b2b4a3223c4ecb8c12469bd778f81
parent69f3c630faac75aea68a4d954417351bb5423eda (diff)
downloadsamba-ecc0c18889cb3d844310fb91130680df22663a31.tar.gz
samba-ecc0c18889cb3d844310fb91130680df22663a31.tar.bz2
samba-ecc0c18889cb3d844310fb91130680df22663a31.zip
r14847: Tell static checkers that exit_server() doesn't
return. Jeremy. (This used to be commit 9c5e26a56aaaf1143b43e61d208ddaeb96f2ffcb)
-rw-r--r--source3/include/includes.h1
-rw-r--r--source3/smbd/server.c15
2 files changed, 11 insertions, 5 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index e02a981d56..620af59db7 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -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 */
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 5da73046a1..4d737d2849 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -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
}