svn commit: samba r14847 - in branches/SAMBA_3_0/source: include
smbd
jra at samba.org
jra at samba.org
Sat Apr 1 05:41:35 GMT 2006
Author: jra
Date: 2006-04-01 05:41:34 +0000 (Sat, 01 Apr 2006)
New Revision: 14847
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14847
Log:
Tell static checkers that exit_server() doesn't
return.
Jeremy.
Modified:
branches/SAMBA_3_0/source/include/includes.h
branches/SAMBA_3_0/source/smbd/server.c
Changeset:
Modified: branches/SAMBA_3_0/source/include/includes.h
===================================================================
--- branches/SAMBA_3_0/source/include/includes.h 2006-04-01 05:41:02 UTC (rev 14846)
+++ branches/SAMBA_3_0/source/include/includes.h 2006-04-01 05:41:34 UTC (rev 14847)
@@ -1562,4 +1562,5 @@
#endif
void smb_panic( const char *why ) NORETURN_ATTRIBUTE ;
+void exit_server(const char *reason) NORETURN_ATTRIBUTE ;
#endif /* _INCLUDES_H */
Modified: branches/SAMBA_3_0/source/smbd/server.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/server.c 2006-04-01 05:41:02 UTC (rev 14846)
+++ branches/SAMBA_3_0/source/smbd/server.c 2006-04-01 05:41:34 UTC (rev 14847)
@@ -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