ACK: [PATCH] uefi: uefirtmisc: reduce scope of some variables
Alex Hung
alex.hung at canonical.com
Wed Sep 22 19:09:22 UTC 2021
On 2021-09-22 4:40 a.m., 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: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list