Skip to content

Commit

Permalink
terminal: remove unneeded if condition
Browse files Browse the repository at this point in the history
Fixes: Coverity 1461742.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner authored and stgraber committed May 5, 2020
1 parent 0baff7b commit 63910a2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lxc/terminal.c
Expand Up @@ -1167,10 +1167,7 @@ int lxc_terminal_map_ids(struct lxc_conf *c, struct lxc_terminal *terminal)
if (strcmp(terminal->name, "") == 0)
return 0;

if (terminal->slave >= 0)
ret = userns_exec_mapped_root(terminal->name, terminal->slave, c);
else
ret = userns_exec_mapped_root(terminal->name, terminal->slave, c);
ret = userns_exec_mapped_root(terminal->name, terminal->slave, c);
if (ret < 0) {
return log_error(-1, "Failed to chown terminal %d(%s)",
terminal->slave, terminal->name);
Expand Down

0 comments on commit 63910a2

Please sign in to comment.