Commit Diff


commit - 40538e52bf546dc48be253772ea579110e483b37
commit + 493d280daf90dd38c229a3d7b19d98201aabc3ea
blob - f998ee471383cb9f2e81359a8bf4012acd12e644
blob + f66b9f38c71db3ea73f08f317e7446e2d3929e59
--- gotwebd/gotwebd.c
+++ gotwebd/gotwebd.c
@@ -51,7 +51,7 @@ int	 main(int, char **);
 int	 gotwebd_configure(struct gotwebd *, uid_t, gid_t);
 void	 gotwebd_configure_done(struct gotwebd *);
 void	 gotwebd_sighdlr(int sig, short event, void *arg);
-void	 gotwebd_shutdown(int);
+void	 gotwebd_shutdown(void);
 void	 gotwebd_dispatch_server(int, short, void *);
 void	 gotwebd_dispatch_gotweb(int, short, void *);
 
@@ -271,7 +271,7 @@ gotwebd_sighdlr(int sig, short event, void *arg)
 		break;
 	case SIGTERM:
 	case SIGINT:
-		gotwebd_shutdown(0);
+		gotwebd_shutdown();
 		break;
 	default:
 		log_warn("unexpected signal %d", sig);
@@ -419,11 +419,11 @@ main(int argc, char **argv)
 
 	if (proc_type == GOTWEBD_PROC_PARENT) {
 		if (parse_config(env->gotwebd_conffile, env) == -1)
-			gotwebd_shutdown(1);
+			exit(1);
 
 		if (no_action) {
 			fprintf(stderr, "configuration OK\n");
-			gotwebd_shutdown(0);
+			exit(0);
 		}
 
 		if (env->user)
@@ -549,7 +549,6 @@ main(int argc, char **argv)
 
 	log_debug("%s gotwebd exiting", getprogname());
 
-	gotwebd_shutdown(0);
 	return (0);
 }
 
@@ -638,7 +637,7 @@ gotwebd_configure_done(struct gotwebd *env)
 }
 
 void
-gotwebd_shutdown(int exit_code)
+gotwebd_shutdown(void)
 {
 	struct gotwebd	*env = gotwebd_env;
 	pid_t		 pid;
@@ -691,5 +690,5 @@ gotwebd_shutdown(int exit_code)
 	free(gotwebd_env);
 
 	log_warnx("gotwebd terminating");
-	exit(exit_code);
+	exit(0);
 }