svn commit: samba r14846 - in trunk/source: include smbd
jra at samba.org
jra at samba.org
Sat Apr 1 05:41:03 GMT 2006
Author: jra
Date: 2006-04-01 05:41:02 +0000 (Sat, 01 Apr 2006)
New Revision: 14846
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14846
Log:
Tell static checkers that exit_server() doesn't
return.
Jeremy.
Modified:
trunk/source/include/includes.h
trunk/source/smbd/server.c
Changeset:
Modified: trunk/source/include/includes.h
===================================================================
--- trunk/source/include/includes.h 2006-04-01 03:46:46 UTC (rev 14845)
+++ trunk/source/include/includes.h 2006-04-01 05:41:02 UTC (rev 14846)
@@ -1563,4 +1563,5 @@
#endif
void smb_panic( const char *why ) NORETURN_ATTRIBUTE ;
+void exit_server(const char *reason) NORETURN_ATTRIBUTE ;
#endif /* _INCLUDES_H */
Modified: trunk/source/smbd/server.c
===================================================================
--- trunk/source/smbd/server.c 2006-04-01 03:46:46 UTC (rev 14845)
+++ trunk/source/smbd/server.c 2006-04-01 05:41:02 UTC (rev 14846)
@@ -570,10 +570,14 @@
#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 @@
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 @@
CatchSignal(SIGABRT,SIGNAL_CAST SIG_DFL);
#endif
abort();
- return(True);
}
#endif
@@ -616,7 +621,7 @@
Exit the server.
****************************************************************************/
-void exit_server(const char *reason)
+ void exit_server(const char *reason)
{
static int firsttime=1;
@@ -659,7 +664,7 @@
DEBUGLEVEL = oldlevel;
DEBUG(0,("===============================================================\n"));
#if DUMP_CORE
- if (dump_core()) return;
+ dump_core();
#endif
}
More information about the samba-cvs
mailing list