1
1
mirror of https://github.com/bitcoin/bitcoin.git synced 2024-05-17 23:56:39 +00:00

netaddress: Fix indentation in IsLocal

This commit is contained in:
Carl Dong 2019-02-04 13:47:46 -05:00
parent 5c99bb0047
commit 6180b5f32b

View File

@ -183,15 +183,15 @@ bool CNetAddr::IsTor() const
bool CNetAddr::IsLocal() const bool CNetAddr::IsLocal() const
{ {
// IPv4 loopback // IPv4 loopback
if (IsIPv4() && (GetByte(3) == 127 || GetByte(3) == 0)) if (IsIPv4() && (GetByte(3) == 127 || GetByte(3) == 0))
return true; return true;
// IPv6 loopback (::1/128) // IPv6 loopback (::1/128)
static const unsigned char pchLocal[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}; static const unsigned char pchLocal[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1};
if (memcmp(ip, pchLocal, 16) == 0) if (memcmp(ip, pchLocal, 16) == 0)
return true; return true;
return false; return false;
} }
bool CNetAddr::IsValid() const bool CNetAddr::IsValid() const