[OpenWrt-Devel] [PATCH procd 1/2] ujail: remove useless arg in clone call

Etienne CHAMPETIER champetier.etienne at gmail.com
Fri Nov 20 18:05:08 EST 2015


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

diff --git a/jail/jail.c b/jail/jail.c
index 56dc9ca..08babde 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()
 {
 	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();
 	}
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list