Skip to content

Commit 3dafc00

Browse files
committedFeb 15, 2019
LINT fix
1 parent 88c68ce commit 3dafc00

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed
 

‎src/network/address.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ void Address::print(std::ostream *s) const
272272
*s << serializeString() << ":" << m_port;
273273
}
274274

275-
bool Address::isLocalhost() const {
275+
bool Address::isLocalhost() const
276+
{
276277
if (isIPv6()) {
277278
static const unsigned char localhost_bytes[] = {
278279
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
@@ -281,8 +282,10 @@ bool Address::isLocalhost() const {
281282

282283
auto addr = m_address.ipv6.sin6_addr.s6_addr;
283284

285+
// clang-format off
284286
return memcmp(addr, localhost_bytes, 16) == 0 ||
285287
memcmp(addr, mapped_ipv4_localhost, 13) == 0;
288+
// clang-format on
286289
}
287290

288291
return (m_address.ipv4.sin_addr.s_addr & 0xFF) == 0x7f;

‎src/unittest/test_address.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2323
#include "settings.h"
2424
#include "network/socket.h"
2525

26-
class TestAddress : public TestBase {
26+
class TestAddress : public TestBase
27+
{
2728
public:
28-
TestAddress()
29-
{
30-
TestManager::registerTestModule(this);
31-
}
29+
TestAddress() { TestManager::registerTestModule(this); }
3230

3331
const char *getName() { return "TestAddress"; }
3432

0 commit comments

Comments
 (0)
Please sign in to comment.