Skip to content

Commit

Permalink
coverity: preserve_ns returns bool, not int
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
hallyn authored and stgraber committed Nov 17, 2016
1 parent ad2416c commit 4c17a8a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lxc/start.c
Expand Up @@ -933,8 +933,7 @@ static int lxc_spawn(struct lxc_handler *handler)
goto out_delete_net;
}

if (preserve_ns(handler->nsfd, handler->clone_flags, handler->pid,
&errmsg) < 0) {
if (!preserve_ns(handler->nsfd, handler->clone_flags, handler->pid, &errmsg)) {
INFO("Failed to store namespace references for stop hook: %s",
errmsg ? errmsg : "(Out of memory)");
free(errmsg);
Expand Down

0 comments on commit 4c17a8a

Please sign in to comment.