Skip to content

Commit e77aa44

Browse files
authored
Merge pull request ceph#52938 from batrick/mon-loop-refactor
mon: refactor loop variable names Reviewed-by: Radoslaw Zarzynski <[email protected]>
2 parents 50c7908 + 4893f2b commit e77aa44

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/mon/ConfigMonitor.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -264,20 +264,20 @@ bool ConfigMonitor::preprocess_command(MonOpRequestRef op)
264264
} else {
265265
f->open_array_section("config");
266266
}
267-
for (auto s : sections) {
268-
for (auto& i : s.second->options) {
267+
for (auto& [sec_name, section] : sections) {
268+
for (auto& [opt_name, masked_opt] : section->options) {
269269
if (!f) {
270-
tbl << s.first;
271-
tbl << i.second.mask.to_str();
272-
tbl << Option::level_to_str(i.second.opt->level);
273-
tbl << i.first;
274-
tbl << i.second.raw_value;
275-
tbl << (i.second.opt->can_update_at_runtime() ? "" : "*");
270+
tbl << sec_name;
271+
tbl << masked_opt.mask.to_str();
272+
tbl << Option::level_to_str(masked_opt.opt->level);
273+
tbl << opt_name;
274+
tbl << masked_opt.raw_value;
275+
tbl << (masked_opt.opt->can_update_at_runtime() ? "" : "*");
276276
tbl << TextTable::endrow;
277277
} else {
278278
f->open_object_section("option");
279-
f->dump_string("section", s.first);
280-
i.second.dump(f.get());
279+
f->dump_string("section", sec_name);
280+
masked_opt.dump(f.get());
281281
f->close_section();
282282
}
283283
}

0 commit comments

Comments
 (0)