projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6acc48c
)
jail: remove unreachable code
author
Daniel Golle
<daniel@makrotopia.org>
Wed, 9 Dec 2020 11:10:32 +0000
(11:10 +0000)
committer
Daniel Golle
<daniel@makrotopia.org>
Wed, 9 Dec 2020 11:10:32 +0000
(11:10 +0000)
Replace unreachable error handling code in function setns_open with
a more appropriate assertion.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/jail.c
patch
|
blob
|
history
diff --git
a/jail/jail.c
b/jail/jail.c
index 385dbe7b0336346360ee93e408c6795874e0a14d..a143b53c0a584c8320cb909c0808604f30269067 100644
(file)
--- 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;