From 3ec1df9b9e06769c837e57de321818cd39a47fb8 Mon Sep 17 00:00:00 2001 From: Automatic source maintenance Date: Sat, 23 Jan 2010 18:13:07 -0700 Subject: [PATCH] SourceFormat Enforcement --- src/ip/IpAddress.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/ip/IpAddress.cc b/src/ip/IpAddress.cc index 15f6401137..38e23d90aa 100644 --- a/src/ip/IpAddress.cc +++ b/src/ip/IpAddress.cc @@ -286,12 +286,12 @@ void IpAddress::SetEmpty() bool IpAddress::SetIPv4() { #if USE_IPV6 - static const struct in6_addr v4_localhost = - {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }}}; - static const struct in6_addr v4_any = - {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}}; + static const struct in6_addr v4_localhost = {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }} + }; + static const struct in6_addr v4_any = {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }} + }; if ( IsLocalhost() ) { m_SocketAddr.sin6_addr = v4_localhost; @@ -316,9 +316,9 @@ bool IpAddress::SetIPv4() bool IpAddress::IsLocalhost() const { #if USE_IPV6 - static const struct in6_addr v4_localhost = - {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }}}; + static const struct in6_addr v4_localhost = {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x01 }} + }; return IN6_IS_ADDR_LOOPBACK( &m_SocketAddr.sin6_addr ) || IN6_ARE_ADDR_EQUAL( &m_SocketAddr.sin6_addr, &v4_localhost ); #else @@ -363,9 +363,9 @@ bool IpAddress::IsNoAddr() const { // IFF the address == 0xff..ff (all ones) #if USE_IPV6 - static const struct in6_addr v6_noaddr = - {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}}; + static const struct in6_addr v6_noaddr = {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }} + }; return IN6_ARE_ADDR_EQUAL( &m_SocketAddr.sin6_addr, &v6_noaddr ); #else -- 2.47.3