[PATCH] uefi: uefirtvariable: clean up cppcheck style warning
Colin King
colin.king at canonical.com
Wed Aug 5 07:50:27 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
cppcheck found a minor style issue:
[src/uefi/uefirtvariable/uefirtvariable.c:470]:
(style) The scope of the variable 'ioret' can be reduced.
Clean this up.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/uefi/uefirtvariable/uefirtvariable.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
index e59e005..b3c7559 100644
--- a/src/uefi/uefirtvariable/uefirtvariable.c
+++ b/src/uefi/uefirtvariable/uefirtvariable.c
@@ -467,7 +467,6 @@ static bool strlen_valid(const uint16_t *variablename, const uint64_t variablena
static int getnextvariable_test2(fwts_framework *fw)
{
- long ioret;
uint64_t status;
struct efi_getnextvariablename getnextvariablename;
@@ -494,6 +493,8 @@ static int getnextvariable_test2(fwts_framework *fw)
*/
variablename[0] = '\0';
while (true) {
+ long ioret;
+
variablenamesize = maxvariablenamesize;
ioret = ioctl(fd, EFI_RUNTIME_GET_NEXTVARIABLENAME, &getnextvariablename);
--
2.5.0
More information about the fwts-devel
mailing list