ACK: [PATCH 32/46] lib: fwts_gpe: reduce scope of variables

IvanHu ivan.hu at canonical.com
Thu Jan 15 07:36:37 UTC 2015


On 01/14/2015 03:04 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> cppcheck is picking up some minor style issues which can
> be easily fixed:
>
> [src/lib/src/fwts_gpe.c:35]:
> 	(style) The scope of the variable 'i' can be reduced.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/lib/src/fwts_gpe.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/lib/src/fwts_gpe.c b/src/lib/src/fwts_gpe.c
> index a78c0d8..6ef759f 100644
> --- a/src/lib/src/fwts_gpe.c
> +++ b/src/lib/src/fwts_gpe.c
> @@ -32,10 +32,10 @@
>    */
>   void fwts_gpe_free(fwts_gpe *gpe, const int count)
>   {
> -	int i;
> -
>   	if (gpe) {
> -		for (i=0;i<count;i++) {
> +		int i;
> +
> +		for (i = 0; i < count; i++) {
>   			if (gpe[i].name)
>   				free(gpe[i].name);
>   		}
>

Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list