Skip to content

Commit beac62e

Browse files
committed
Merge bitcoin/bitcoin#31480: refactor: Fix "modernize-use-starts-ends-with" clang-tidy warning
df27ee9 refactor: Fix "modernize-use-starts-ends-with" clang-tidy warning (Hennadii Stepanov) Pull request description: This PR is a follow-up to #31306 and fixes the "modernize-use-starts-ends-with" warning in the multiprocess code (see bitcoin/bitcoin#30975 (comment)). Fixes bitcoin-core/libmultiprocess#124. ACKs for top commit: l0rinc: ACK df27ee9 theuni: utACK df27ee9 ryanofsky: Code review ACK df27ee9 Tree-SHA512: b5685818e9a3f161949b79586138e4341c5fbcc77296d5f4b13ff0183b6efaac1baea8a6d9304566f25517018d4f67b6d407105a36971a03f4077697d53f17ff
2 parents 435ad57 + df27ee9 commit beac62e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ipc/process.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static bool ParseAddress(std::string& address,
7272
struct sockaddr_un& addr,
7373
std::string& error)
7474
{
75-
if (address.compare(0, 4, "unix") == 0 && (address.size() == 4 || address[4] == ':')) {
75+
if (address == "unix" || address.starts_with("unix:")) {
7676
fs::path path;
7777
if (address.size() <= 5) {
7878
path = data_dir / fs::PathFromString(strprintf("%s.sock", RemovePrefixView(dest_exe_name, "bitcoin-")));

0 commit comments

Comments
 (0)