ACK: [PATCH 41/46] uefi: uefibootpath: reduce scope of variables

IvanHu ivan.hu at canonical.com
Thu Jan 15 07:39:05 UTC 2015


On 01/14/2015 03:05 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/uefi/uefibootpath/uefibootpath.c:737]:
> 	(style) The scope of the variable 'ret' can be reduced.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/uefi/uefibootpath/uefibootpath.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/uefi/uefibootpath/uefibootpath.c b/src/uefi/uefibootpath/uefibootpath.c
> index 46c2455..1c11963 100644
> --- a/src/uefi/uefibootpath/uefibootpath.c
> +++ b/src/uefi/uefibootpath/uefibootpath.c
> @@ -734,7 +734,6 @@ static int uefibootpath_info_bootdev(fwts_framework *fw, fwts_uefi_var *var)
>   static void uefibootpath_var(fwts_framework *fw, fwts_uefi_var *var)
>   {
>   	char varname[512];
> -	int ret;
>
>   	fwts_uefi_get_varname(varname, sizeof(varname), var);
>
> @@ -742,6 +741,8 @@ static void uefibootpath_var(fwts_framework *fw, fwts_uefi_var *var)
>   	if ((strlen(varname) == 8) && (strncmp(varname, "Boot", 4) == 0)
>   			&& isxdigit(varname[4]) && isxdigit(varname[5])
>   			&& isxdigit(varname[6]) && isxdigit(varname[7])) {
> +		int ret;
> +
>   		fwts_log_info_verbatum(fw, "Name: %s", varname);
>   		errors = 0;
>   		ret = uefibootpath_info_bootdev(fw, var);
>

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



More information about the fwts-devel mailing list