lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 10 Jun 2015 13:11:35 -0700
From:	Joe Perches <joe@...ches.com>
To:	Zoltán Lajos Kis <zoltan.lajos.kis@...il.com>
Cc:	oleg.drokin@...el.com, andreas.dilger@...el.com,
	gregkh@...uxfoundation.org, Julia.Lawall@...6.fr,
	kumari.radha3@...il.com, mahfouz.saif.elyazal@...il.com,
	gdonald@...il.com, HPDD-discuss@...ts.01.org,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] Staging: lustre: fix braces are not necessary in
 dt_object.c

On Wed, 2015-06-10 at 22:00 +0200, Zoltán Lajos Kis wrote:
> Fixes a braces {} are not necessary for any arm of this statement
> warning in lustre/lustre/obdclass/dt_object.c that was found by
> the checkpatch.pl tool.
> 
> Signed-off-by: Zoltán Lajos Kis <zoltan.lajos.kis@...il.com>
> ---
>  drivers/staging/lustre/lustre/obdclass/dt_object.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/obdclass/dt_object.c b/drivers/staging/lustre/lustre/obdclass/dt_object.c
> index 4b5c828d..46fbf21 100644
> --- a/drivers/staging/lustre/lustre/obdclass/dt_object.c
> +++ b/drivers/staging/lustre/lustre/obdclass/dt_object.c
> @@ -329,9 +329,9 @@ static struct dt_object *dt_reg_open(const struct lu_env *env,
>  	int result;
>  
>  	result = dt_lookup_dir(env, p, name, fid);
> -	if (result == 0){
> +	if (result == 0)
>  		o = dt_locate(env, dt, fid);
> -	} else
> +	else
>  		o = ERR_PTR(result);
>  
>  	return o;

My preference for this sort of thing is generally:

static struct dt_object *dt_reg_open(const struct lu_env *env,
				     struct dt_device *dt,
				     struct dt_object *p,
				     const char *name,
				     struct lu_fid *fid)
{
	int result;

	result = dt_lookup_dir(env, p, name, fid);
	if (result)
		return ERR_PTR(result);

	return dt_locate(env, dt, fid);
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ