From c36ea0968d68737d8b2750496259244925e30f3c Mon Sep 17 00:00:00 2001 From: Tim Zhang Date: Tue, 29 Sep 2020 15:28:07 +0800 Subject: [PATCH] agent: remove unreachable code The code in the end of init_child is unreachable and need to be removed. The code after do_exec is unreachable and need to be removed. Signed-off-by: Tim Zhang --- src/agent/rustjail/src/container.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/agent/rustjail/src/container.rs b/src/agent/rustjail/src/container.rs index 50615c7ffe..35ddb71e39 100644 --- a/src/agent/rustjail/src/container.rs +++ b/src/agent/rustjail/src/container.rs @@ -340,8 +340,6 @@ pub fn init_child() { return; } } - - std::process::exit(-1); } fn do_init_child(cwfd: RawFd) -> Result<()> { @@ -647,8 +645,6 @@ fn do_init_child(cwfd: RawFd) -> Result<()> { } do_exec(&args); - - Err(anyhow!("fail to create container")) } impl BaseContainer for LinuxContainer {