diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:32:55 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:33:19 +0200 |
commit | 7810209ba32fcebfa90b081670595daaa5333a78 (patch) | |
tree | 98410d5cc7d9d762bbde0cb4eae8041aa6e2e542 /src/corelib/io/qipaddress.cpp | |
parent | 6f2eabb54e3f827ebd2b90f68144b86342933869 (diff) | |
parent | 88625709058b386ee74cca536c6c5556159c99fa (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I4ea2b77cc201daed94fbe321f146dfd20365a534
Diffstat (limited to 'src/corelib/io/qipaddress.cpp')
-rw-r--r-- | src/corelib/io/qipaddress.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/io/qipaddress.cpp b/src/corelib/io/qipaddress.cpp index d9f7916dd4..b3421fca8f 100644 --- a/src/corelib/io/qipaddress.cpp +++ b/src/corelib/io/qipaddress.cpp @@ -67,7 +67,7 @@ static const QChar *checkedToAscii(Buffer &buffer, const QChar *begin, const QCh *dst++ = *src++; } *dst = '\0'; - return 0; + return nullptr; } static bool parseIp4Internal(IPv4Address &address, const char *ptr, bool acceptLeadingZero); @@ -175,7 +175,7 @@ const QChar *parseIp6(IPv6Address &address, const QChar *begin, const QChar *end memset(address, 0, sizeof address); if (colonCount == 2 && end - begin == 2) // "::" - return 0; + return nullptr; // if there's a double colon ("::"), this is how many zeroes it means int zeroWordsToFill; @@ -236,7 +236,7 @@ const QChar *parseIp6(IPv6Address &address, const QChar *begin, const QChar *end address[13] = ip4 >> 16; address[14] = ip4 >> 8; address[15] = ip4; - return 0; + return nullptr; } address[pos++] = x >> 8; @@ -248,7 +248,7 @@ const QChar *parseIp6(IPv6Address &address, const QChar *begin, const QChar *end return begin + (endptr - buffer.data()); ptr = endptr + 1; } - return pos == 16 ? 0 : end; + return pos == 16 ? nullptr : end; } static inline QChar toHex(uchar c) @@ -256,7 +256,7 @@ static inline QChar toHex(uchar c) return QChar::fromLatin1(QtMiscUtils::toHexLower(c)); } -void toString(QString &appendTo, IPv6Address address) +void toString(QString &appendTo, const IPv6Address address) { // the longest IPv6 address possible is: // "1111:2222:3333:4444:5555:6666:255.255.255.255" |