[PATCH 16/46] bios: mtrr: reduce scope of variables
Colin King
colin.king at canonical.com
Tue Jan 13 19:04:35 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/bios/mtrr/mtrr.c:418]:
(style) The scope of the variable 'entry' can be reduced.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/bios/mtrr/mtrr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
index b6a977d..51fe616 100644
--- a/src/bios/mtrr/mtrr.c
+++ b/src/bios/mtrr/mtrr.c
@@ -415,13 +415,13 @@ static int validate_iomem(fwts_framework *fw)
static void do_mtrr_resource(fwts_framework *fw)
{
fwts_list_link *item;
- struct mtrr_entry *entry;
fwts_log_info_verbatum(fw,"MTRR overview");
fwts_log_info_verbatum(fw,"-------------");
fwts_list_foreach(item, mtrr_list) {
- entry = fwts_list_data(struct mtrr_entry *, item);
+ struct mtrr_entry *entry = fwts_list_data(struct mtrr_entry *, item);
+
if (entry->type & DISABLED)
fwts_log_info_verbatum(fw, "Reg %hhu: disabled", entry->reg);
else
--
2.1.4
More information about the fwts-devel
mailing list