From 111416d10b121e5dff3e279c784847f5300aaeec Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 9 Dec 2020 11:10:32 +0000 Subject: [PATCH] jail: remove unreachable code Replace unreachable error handling code in function setns_open with a more appropriate assertion. Signed-off-by: Daniel Golle --- jail/jail.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jail/jail.c b/jail/jail.c index 385dbe7..a143b53 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -1008,8 +1008,7 @@ static int setns_open(unsigned long nstype) { int *fd = get_namespace_fd(nstype); - if (!*fd) - return EFAULT; + assert(fd != NULL); if (*fd == -1) return 0; -- 2.30.2