[PATCH] uefi: uefirtmisc: reduce scope of some variables
Colin King
colin.king at canonical.com
Wed Sep 22 10:40:15 UTC 2021
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;
--
2.32.0
More information about the fwts-devel
mailing list