mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-04 04:32:20 +02:00
refactor: Fix "modernize-use-starts-ends-with" clang-tidy warning
This commit is contained in:
@ -72,7 +72,7 @@ static bool ParseAddress(std::string& address,
|
|||||||
struct sockaddr_un& addr,
|
struct sockaddr_un& addr,
|
||||||
std::string& error)
|
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;
|
fs::path path;
|
||||||
if (address.size() <= 5) {
|
if (address.size() <= 5) {
|
||||||
path = data_dir / fs::PathFromString(strprintf("%s.sock", RemovePrefixView(dest_exe_name, "bitcoin-")));
|
path = data_dir / fs::PathFromString(strprintf("%s.sock", RemovePrefixView(dest_exe_name, "bitcoin-")));
|
||||||
|
Reference in New Issue
Block a user