diff mbox

[OpenWrt-Devel,procd,v2,02/17] ujail: don't pass unused arg in clone call

Message ID 1448474090-30280-3-git-send-email-champetier.etienne@gmail.com
State Superseded
Headers show

Commit Message

Etienne Champetier Nov. 25, 2015, 5:54 p.m. UTC
clone() call need a function with "void *" arg
(else we have a compilation error)

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
---
 jail/jail.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/jail/jail.c b/jail/jail.c
index 56dc9ca..9952ed9 100644
--- a/jail/jail.c
+++ b/jail/jail.c
@@ -272,7 +272,7 @@  static int exec_jail()
 	exit(EXIT_FAILURE);
 }
 
-static int spawn_jail(void *arg)
+static int spawn_jail(void *_notused)
 {
 	if (opts.name && sethostname(opts.name, strlen(opts.name))) {
 		ERROR("failed to sethostname: %s\n", strerror(errno));
@@ -424,7 +424,7 @@  int main(int argc, char **argv)
 	if (opts.namespace) {
 		jail_process.pid = clone(spawn_jail,
 			child_stack + STACK_SIZE,
-			CLONE_NEWUTS | CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWIPC | SIGCHLD, argv);
+			CLONE_NEWUTS | CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWIPC | SIGCHLD, NULL);
 	} else {
 		jail_process.pid = fork();
 	}