[PATCH 09/10] hpet: hpet_check: fix shadowing of variable 'str'

Colin King colin.king at canonical.com
Thu Jun 12 18:03:48 UTC 2014


From: Colin Ian King <colin.king at canonical.com>

variable 'str' was being shadowed, so rename the inner scoped
one to tmpstr just to avoid any confusion

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/hpet/hpet_check/hpet_check.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/hpet/hpet_check/hpet_check.c b/src/hpet/hpet_check/hpet_check.c
index 553dbc0..89b7d2a 100644
--- a/src/hpet/hpet_check/hpet_check.c
+++ b/src/hpet/hpet_check/hpet_check.c
@@ -76,15 +76,15 @@ static void hpet_parse_device_hpet(fwts_framework *fw,
 		    (strstr(str, "ResourceTemplate") != NULL)) {
 			fwts_list_link *tmp_item = item->next;
 			for (; tmp_item != NULL; tmp_item = tmp_item->next) {
-				const char *str = fwts_text_list_text(tmp_item);
+				const char *tmpstr = fwts_text_list_text(tmp_item);
 
-				if (strstr(str, "Memory32Fixed") != NULL) {
+				if (strstr(tmpstr, "Memory32Fixed") != NULL) {
 					/* Next line contains base address */
 					if (tmp_item->next != NULL) {
 						hpet_parse_check_base(fw, table, tmp_item->next);
 						return;
 					}
-				} else if (strstr(str, "DWordMemory") != NULL) {
+				} else if (strstr(tmpstr, "DWordMemory") != NULL) {
 					if (tmp_item->next != NULL &&		/* Granularity */
 					    tmp_item->next->next != NULL) {	/* Base address */
 						hpet_parse_check_base(fw, table, tmp_item->next->next);
-- 
2.0.0




More information about the fwts-devel mailing list