ACK: [PATCH] uefi: uefirtmisc: reduce scope of some variables

ivanhu ivan.hu at canonical.com
Thu Sep 23 03:48:49 UTC 2021



On 9/22/21 6:40 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Several variables are used in a deeper scope, move these to clean up
> cppcheck style warnings.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/uefi/uefirtmisc/uefirtmisc.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c
> index c00ed442..f6038f5f 100644
> --- a/src/uefi/uefirtmisc/uefirtmisc.c
> +++ b/src/uefi/uefirtmisc/uefirtmisc.c
> @@ -281,12 +281,13 @@ static int uefirtmisc_test3(fwts_framework *fw)
>  
>  static int uefirtmisc_test4(fwts_framework *fw)
>  {
> -	long ioret;
> -	uint64_t status;
> -	struct efi_getnexthighmonotoniccount getnexthighmonotoniccount;
> -	uint32_t highcount;
>  
>  	if (!(runtimeservicessupported & EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT)) {
> +		long ioret;
> +		uint64_t status;
> +		struct efi_getnexthighmonotoniccount getnexthighmonotoniccount;
> +		uint32_t highcount;
> +
>  		getnexthighmonotoniccount.HighCount = &highcount;
>  		getnexthighmonotoniccount.status = &status;
>  		status = ~0ULL;
> 

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



More information about the fwts-devel mailing list