diff options
| author | Daniel Golle | 2020-12-09 11:10:32 +0000 |
|---|---|---|
| committer | Daniel Golle | 2020-12-09 11:10:32 +0000 |
| commit | 111416d10b121e5dff3e279c784847f5300aaeec (patch) | |
| tree | 16696855ebaa970c2a668b2676e571fc38fc66fd | |
| parent | 6acc48c7a2faac48c534b8a5516500c270550a9e (diff) | |
| download | procd-111416d10b121e5dff3e279c784847f5300aaeec.tar.gz | |
jail: remove unreachable code
Replace unreachable error handling code in function setns_open with
a more appropriate assertion.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
| -rw-r--r-- | jail/jail.c | 3 |
1 files changed, 1 insertions, 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; |