summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-12-11 12:51:46 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-08-18 12:06:21 +0200
commitf54bb15f9d373877954e44db3a8bb368aff45b42 (patch)
treef471b74f2548364ab6705a3e6558f7fd9ded65b5
parentb0225c2c0d89200a29dc3d0b59d2e87a79cbaeb8 (diff)
downloadqemu-f54bb15f9d373877954e44db3a8bb368aff45b42.zip
mtree: remove write-only field
ml->printed is never set to true. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--memory.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/memory.c b/memory.c
index 8da29af672..031ff516ae 100644
--- a/memory.c
+++ b/memory.c
@@ -1972,7 +1972,6 @@ typedef struct MemoryRegionList MemoryRegionList;
struct MemoryRegionList {
const MemoryRegion *mr;
- bool printed;
QTAILQ_ENTRY(MemoryRegionList) queue;
};
@@ -2002,7 +2001,7 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
/* check if the alias is already in the queue */
QTAILQ_FOREACH(ml, alias_print_queue, queue) {
- if (ml->mr == mr->alias && !ml->printed) {
+ if (ml->mr == mr->alias) {
found = true;
}
}
@@ -2010,7 +2009,6 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
if (!found) {
ml = g_new(MemoryRegionList, 1);
ml->mr = mr->alias;
- ml->printed = false;
QTAILQ_INSERT_TAIL(alias_print_queue, ml, queue);
}
mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx
@@ -2092,10 +2090,8 @@ void mtree_info(fprintf_function mon_printf, void *f)
mon_printf(f, "aliases\n");
/* print aliased regions */
QTAILQ_FOREACH(ml, &ml_head, queue) {
- if (!ml->printed) {
- mon_printf(f, "%s\n", memory_region_name(ml->mr));
- mtree_print_mr(mon_printf, f, ml->mr, 0, 0, &ml_head);
- }
+ mon_printf(f, "%s\n", memory_region_name(ml->mr));
+ mtree_print_mr(mon_printf, f, ml->mr, 0, 0, &ml_head);
}
QTAILQ_FOREACH_SAFE(ml, &ml_head, queue, ml2) {