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: <1513191696.27409.33.camel@perches.com>
Date:   Wed, 13 Dec 2017 11:01:36 -0800
From:   Joe Perches <joe@...ches.com>
To:     Valentin Vidic <Valentin.Vidic@...Net.hr>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Simon Sandström <simon@...anor.nu>,
        Marcin Ciupak <marcin.s.ciupak@...il.com>,
        Marcus Wolf <linux@...f-entwicklungen.de>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/8] staging: pi433: move var declaration to function
 level

On Wed, 2017-12-13 at 15:21 +0100, Valentin Vidic wrote:
>   WARNING: Missing a blank line after declarations
[]
> diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
[]
> @@ -565,6 +565,7 @@ pi433_tx_thread(void *data)
>  	bool   rx_interrupted = false;
>  	int    position, repetitions;
>  	int    retval;
> +	int    temp;
>  
>  	while (1) {
>  		/* wait for fifo to be populated or for request to terminate*/
> @@ -700,7 +701,7 @@ pi433_tx_thread(void *data)
>  		while ((repetitions > 0) && (size > position)) {
>  			if ((size - position) > device->free_in_fifo) {
>  				/* msg to big for fifo - take a part */
> -				int temp = device->free_in_fifo;
> +				temp = device->free_in_fifo;

It's generally better to keep variable declarations
to the innermost scope possible and not move them
outwards unnecessarily.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ