Skip to content

Commit

Permalink
Merge bitcoin/bitcoin#31480: refactor: Fix "modernize-use-starts-ends…
Browse files Browse the repository at this point in the history
…-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 chaincodelabs/libmultiprocess#124.

ACKs for top commit:
  l0rinc:
    ACK df27ee9
  theuni:
    utACK df27ee9
  ryanofsky:
    Code review ACK df27ee9

Tree-SHA512: b5685818e9a3f161949b79586138e4341c5fbcc77296d5f4b13ff0183b6efaac1baea8a6d9304566f25517018d4f67b6d407105a36971a03f4077697d53f17ff
  • Loading branch information
ryanofsky committed Dec 12, 2024
2 parents 435ad57 + df27ee9 commit beac62e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ipc/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static bool ParseAddress(std::string& address,
struct sockaddr_un& addr,
std::string& error)
{
if (address.compare(0, 4, "unix") == 0 && (address.size() == 4 || address[4] == ':')) {
if (address == "unix" || address.starts_with("unix:")) {
fs::path path;
if (address.size() <= 5) {
path = data_dir / fs::PathFromString(strprintf("%s.sock", RemovePrefixView(dest_exe_name, "bitcoin-")));
Expand Down

0 comments on commit beac62e

Please sign in to comment.