[CRIU] Re: [PATCH 2/4] pipes: Cleanup pipe_should_open_transport

Pavel Emelyanov xemul at parallels.com
Thu Apr 12 06:18:03 EDT 2012


On 04/12/2012 01:45 PM, Cyrill Gorcunov wrote:
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  pipes.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/pipes.c b/pipes.c
> index 8db1678..3ebad92 100644
> --- a/pipes.c
> +++ b/pipes.c
> @@ -178,9 +178,7 @@ void mark_pipe_master()
>  static int pipe_should_open_transport(struct fdinfo_entry *fe,
>  		struct file_desc *d)
>  {
> -	struct pipe_info *pi;
> -	
> -	pi = container_of(d, struct pipe_info, d);
> +	struct pipe_info *pi = container_of(d, struct pipe_info, d);

I prefer assignments on declaration to be only with constants and variables,
but not anything looking as a call (i.e. with braces).

>  	return !pi->create;
>  }
>  



More information about the CRIU mailing list