From: Daniel Golle Date: Wed, 9 Dec 2020 11:10:32 +0000 (+0000) Subject: jail: remove unreachable code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=111416d10b121e5dff3e279c784847f5300aaeec;p=project%2Fprocd.git jail: remove unreachable code Replace unreachable error handling code in function setns_open with a more appropriate assertion. Signed-off-by: Daniel Golle --- 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;