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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130617152823.GF5008@mwanda>
Date:	Mon, 17 Jun 2013 18:28:23 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Lorenz Haspel <lorenz@...gers.com>
Cc:	devel@...uxdriverproject.org, gregkh@...uxfoundation.org,
	puff65537@...sheeslibrary.com, viro@...iv.linux.org.uk,
	michael.banken@...he.stud.uni-erlangen.de,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	linux-kernel@...informatik.uni-erlangen.de
Subject: Re: [PATCH 4/5] silicom: checkpatch: trailing statements

On Mon, Jun 17, 2013 at 04:20:16PM +0200, Lorenz Haspel wrote:
> fixed checkpatch error:
> trailing statements that should be on next line
> 
> Signed-off-by: Michael Banken <michael.banken@...he.stud.uni-erlangen.de>
> Signed-off-by: Lorenz Haspel <lorenz@...gers.com>
> ---
>  drivers/staging/silicom/bpctl_mod.c |   14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
> index 78570dd..85aa900 100644
> --- a/drivers/staging/silicom/bpctl_mod.c
> +++ b/drivers/staging/silicom/bpctl_mod.c
> @@ -165,7 +165,9 @@ static int bp_device_event(struct notifier_block *unused,
>  			memcpy(&cbuf, drvinfo.bus_info, 32);
>  			buf = &cbuf[0];
>  
> -			while (*buf++ != ':') ;
> +			while (*buf != ':')
> +				buf++;
> +			buf++;


No.  This is more complicated than the original.  While loops like
this are idiomatic in C.  The way to fix this is just to do:

			while (*buf++ != ':')
				;

Same for the rest, just move the semi-colon down in every case.

regards,
dan carpenter

--
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