Skip to content

Commit df27ee9

Browse files
committed
refactor: Fix "modernize-use-starts-ends-with" clang-tidy warning
1 parent ea9e64f commit df27ee9

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)