Skip to content

Commit

Permalink
netaddress: Fix indentation in IsLocal
Browse files Browse the repository at this point in the history
  • Loading branch information
dongcarl committed Feb 4, 2019
1 parent 5c99bb0 commit 6180b5f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/netaddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ bool CNetAddr::IsTor() const
bool CNetAddr::IsLocal() const
{
// IPv4 loopback
if (IsIPv4() && (GetByte(3) == 127 || GetByte(3) == 0))
return true;
if (IsIPv4() && (GetByte(3) == 127 || GetByte(3) == 0))
return true;

// 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};
if (memcmp(ip, pchLocal, 16) == 0)
return true;
// 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};
if (memcmp(ip, pchLocal, 16) == 0)
return true;

return false;
return false;
}

bool CNetAddr::IsValid() const
Expand Down

0 comments on commit 6180b5f

Please sign in to comment.