ACK: [PATCH 19/46] cpu: maxfreq: reduce scope of variables

IvanHu ivan.hu at canonical.com
Thu Jan 15 07:32:49 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/cpu/maxfreq/maxfreq.c:36]:
> 	(style) The scope of the variable 'val' can be reduced.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/cpu/maxfreq/maxfreq.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/cpu/maxfreq/maxfreq.c b/src/cpu/maxfreq/maxfreq.c
> index a5b3558..0d7bbb9 100644
> --- a/src/cpu/maxfreq/maxfreq.c
> +++ b/src/cpu/maxfreq/maxfreq.c
> @@ -33,9 +33,10 @@
>   static double maxfreq_max(const char *str)
>   {
>   	double max = -1.0;
> -	double val;
>
>   	while (str && *str) {
> +		double val;
> +
>   		while ((*str != '\0') && isspace(*str))
>   			str++;
>
>

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



More information about the fwts-devel mailing list