[PATCH 46/46] uefi: uefivarinfo: reduce scope of variables
Colin King
colin.king at canonical.com
Tue Jan 13 19:05:05 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
cppcheck is picking up some minor style issues which can
be easily fixed:
[src/uefi/uefivarinfo/uefivarinfo.c:70]:
(style) The scope of the variable 'ioret' can be reduced.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/uefi/uefivarinfo/uefivarinfo.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/uefi/uefivarinfo/uefivarinfo.c b/src/uefi/uefivarinfo/uefivarinfo.c
index 7310931..75b62db 100644
--- a/src/uefi/uefivarinfo/uefivarinfo.c
+++ b/src/uefi/uefivarinfo/uefivarinfo.c
@@ -67,7 +67,6 @@ static int do_checkvariables(
uint64_t *usedvarssize,
const uint64_t maxvarsize)
{
- long ioret;
uint64_t status;
struct efi_getnextvariablename getnextvariablename;
@@ -97,6 +96,8 @@ static int do_checkvariables(
*/
variablename[0] = '\0';
while (true) {
+ long ioret;
+
variablenamesize = MAX_VARNAME_LENGTH;
ioret = ioctl(fd, EFI_RUNTIME_GET_NEXTVARIABLENAME, &getnextvariablename);
--
2.1.4
More information about the fwts-devel
mailing list