Skip to content

Commit 0495943

Browse files
committed
osd: use std::string::starts_with() in PGLog::read_log_and_missing()
Signed-off-by: Radoslaw Zarzynski <[email protected]>
1 parent 74b87d3 commit 0495943

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/osd/PGLog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ struct PGLog : DoutPrefixProvider {
14791479
decode(on_disk_rollback_info_trimmed_to, bp);
14801480
} else if (key == "may_include_deletes_in_missing") {
14811481
missing.may_include_deletes = true;
1482-
} else if (key.substr(0, 7) == std::string("missing")) {
1482+
} else if (key.starts_with("missing")) {
14831483
hobject_t oid;
14841484
pg_missing_item item;
14851485
decode(oid, bp);
@@ -1489,7 +1489,7 @@ struct PGLog : DoutPrefixProvider {
14891489
ceph_assert(missing.may_include_deletes);
14901490
}
14911491
missing.add(oid, std::move(item));
1492-
} else if (key.substr(0, 4) == std::string("dup_")) {
1492+
} else if (key.starts_with("dup_")) {
14931493
++total_dups;
14941494
pg_log_dup_t dup;
14951495
decode(dup, bp);

0 commit comments

Comments
 (0)