[PATCH] bios: mtrr: move buffer memset() to after failed is declared.
Colin King
colin.king at canonical.com
Fri Dec 7 00:12:44 UTC 2012
From: Colin Ian King <colin.king at canonical.com>
the memset() on the buffer should be after all the variables are
declared to make it conform to the fwts house style.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/bios/mtrr/mtrr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
index 294e80b..e2ee506 100644
--- a/src/bios/mtrr/mtrr.c
+++ b/src/bios/mtrr/mtrr.c
@@ -249,9 +249,10 @@ static int validate_iomem(fwts_framework *fw)
FILE *file;
char buffer[4096];
int pcidepth = 0;
- memset(buffer, 0, 4096);
int failed = 0;
+ memset(buffer, 0, 4096);
+
if ((file = fopen("/proc/iomem", "r")) == NULL)
return FWTS_ERROR;
--
1.8.0
More information about the fwts-devel
mailing list