[lxc-devel] [PATCH 4/6] fix dead code

Serge Hallyn serge.hallyn at ubuntu.com
Mon Apr 13 19:08:44 UTC 2015


Quoting Tycho Andersen (tycho.andersen at canonical.com):
> We've already checked that c is not null above, so the false branch can never
> be taken here.
> 
> Reported-by: Coverity
> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/lxccontainer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
> index 0218e57..5b96b8c 100644
> --- a/src/lxc/lxccontainer.c
> +++ b/src/lxc/lxccontainer.c
> @@ -1531,7 +1531,7 @@ static bool lxcapi_createl(struct lxc_container *c, const char *t,
>  		return false;
>  
>  	struct lxc_conf *old = current_config;
> -	current_config = c ? c->lxc_conf : NULL;
> +	current_config = c->lxc_conf;
>  
>  	/*
>  	 * since we're going to wait for create to finish, I don't think we
> -- 
> 2.1.4
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list