svn commit: r300935 - head/usr.sbin/rpc.statd

Garrett Cooper ngie at FreeBSD.org
Sun May 29 04:18:48 UTC 2016


Author: ngie
Date: Sun May 29 04:18:47 2016
New Revision: 300935
URL: https://svnweb.freebsd.org/changeset/base/300935

Log:
  Mark out_of_mem(..) and usage(..) with __dead2 as they both directly call exit
  as a hint to static analysis tools
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/usr.sbin/rpc.statd/statd.c

Modified: head/usr.sbin/rpc.statd/statd.c
==============================================================================
--- head/usr.sbin/rpc.statd/statd.c	Sun May 29 04:02:02 2016	(r300934)
+++ head/usr.sbin/rpc.statd/statd.c	Sun May 29 04:18:47 2016	(r300935)
@@ -72,9 +72,9 @@ static int	create_service(struct netconf
 static void	complete_service(struct netconfig *nconf, char *port_str);
 static void	clearout_service(void);
 static void handle_sigchld(int sig);
-void out_of_mem(void);
+void out_of_mem(void) __dead2;
 
-static void usage(void);
+static void usage(void) __dead2;
 
 int
 main(int argc, char **argv)
@@ -613,7 +613,7 @@ clearout_service(void)
 }
 
 static void
-usage()
+usage(void)
 {
       fprintf(stderr, "usage: rpc.statd [-d] [-h <bindip>] [-p <port>]\n");
       exit(1);
@@ -647,7 +647,7 @@ static void handle_sigchld(int sig __unu
  * Out of memory, fatal
  */
 void
-out_of_mem()
+out_of_mem(void)
 {
 
 	syslog(LOG_ERR, "out of memory");


More information about the svn-src-all mailing list