aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-05-27 16:28:10 -0600
committerTom Tromey <tom@tromey.com>2021-07-05 11:57:40 -0600
commit870c2204a2b69bfeaa298a280e450d20cbfeb890 (patch)
tree0070f81041d16447a3c56b4a6c75bf15f1c8522c
parentb5b44b5df07883e9dd81860ab49e08400727b70d (diff)
downloadbinutils-870c2204a2b69bfeaa298a280e450d20cbfeb890.zip
binutils-870c2204a2b69bfeaa298a280e450d20cbfeb890.tar.gz
binutils-870c2204a2b69bfeaa298a280e450d20cbfeb890.tar.bz2
Minor cleanup to addrmap_index_data::previous_valid
This changes addrmap_index_data::previous_valid to a bool, and initializes it inline.
-rw-r--r--gdb/dwarf2/index-write.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index ccd6ef1..8a8c690 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -421,10 +421,10 @@ struct addrmap_index_data
int operator() (CORE_ADDR start_addr, void *obj);
- /* Non-zero if the previous_* fields are valid.
+ /* True if the previous_* fields are valid.
We can't write an entry until we see the next entry (since it is only then
that we know the end of the entry). */
- int previous_valid = 0;
+ bool previous_valid = false;
/* Index of the CU in the table of all CUs in the index file. */
unsigned int previous_cu_index = 0;
/* Start address of the CU. */
@@ -460,10 +460,10 @@ addrmap_index_data::operator() (CORE_ADDR start_addr, void *obj)
const auto it = cu_index_htab.find (pst);
gdb_assert (it != cu_index_htab.cend ());
previous_cu_index = it->second;
- previous_valid = 1;
+ previous_valid = true;
}
else
- previous_valid = 0;
+ previous_valid = false;
return 0;
}