diff svr-main.c @ 1278:0c47d97aa9d5

merge
author Matt Johnston <matt@ucc.asn.au>
date Wed, 16 Mar 2016 22:53:27 +0800
parents 9169e4e7cbee
children 750ec4ec4cbe
line wrap: on
line diff
--- a/svr-main.c	Tue Mar 15 23:23:31 2016 +0800
+++ b/svr-main.c	Wed Mar 16 22:53:27 2016 +0800
@@ -36,12 +36,12 @@
 static void sigsegv_handler(int);
 static void sigintterm_handler(int fish);
 #ifdef INETD_MODE
-static void main_inetd();
+static void main_inetd(void);
 #endif
 #ifdef NON_INETD_MODE
-static void main_noinetd();
+static void main_noinetd(void);
 #endif
-static void commonsetup();
+static void commonsetup(void);
 
 #if defined(DBMULTI_dropbear) || !defined(DROPBEAR_MULTI)
 #if defined(DBMULTI_dropbear) && defined(DROPBEAR_MULTI)
@@ -104,7 +104,7 @@
 #endif /* INETD_MODE */
 
 #ifdef NON_INETD_MODE
-void main_noinetd() {
+static void main_noinetd() {
 	fd_set fds;
 	unsigned int i, j;
 	int val;
@@ -306,8 +306,8 @@
 #endif
 
 				/* make sure we close sockets */
-				for (i = 0; i < listensockcount; i++) {
-					m_close(listensocks[i]);
+				for (j = 0; j < listensockcount; j++) {
+					m_close(listensocks[j]);
 				}
 
 				m_close(childpipe[0]);
@@ -338,7 +338,7 @@
 
 	const int saved_errno = errno;
 
-	while(waitpid(-1, NULL, WNOHANG) > 0); 
+	while(waitpid(-1, NULL, WNOHANG) > 0) {}
 
 	sa_chld.sa_handler = sigchld_handler;
 	sa_chld.sa_flags = SA_NOCLDSTOP;