mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Additions
This commit is contained in:
parent
631711194b
commit
2bf4723e2a
@ -85,19 +85,19 @@ inline bool parseIPv6(const char * src, unsigned char * dst)
|
|||||||
return clear_dst();
|
return clear_dst();
|
||||||
|
|
||||||
unsigned char tmp[IPV6_BINARY_LENGTH]{};
|
unsigned char tmp[IPV6_BINARY_LENGTH]{};
|
||||||
auto * tp = tmp;
|
unsigned char * tp = tmp;
|
||||||
auto * endp = tp + IPV6_BINARY_LENGTH;
|
unsigned char * endp = tp + IPV6_BINARY_LENGTH;
|
||||||
const auto * curtok = src;
|
const char * curtok = src;
|
||||||
auto saw_xdigit = false;
|
bool saw_xdigit = false;
|
||||||
UInt32 val{};
|
UInt32 val{};
|
||||||
unsigned char * colonp = nullptr;
|
unsigned char * colonp = nullptr;
|
||||||
|
|
||||||
/// Assuming zero-terminated string.
|
/// Assuming zero-terminated string.
|
||||||
while (const auto ch = *src++)
|
while (char ch = *src++)
|
||||||
{
|
{
|
||||||
const auto num = unhex(ch);
|
UInt8 num = unhex(ch);
|
||||||
|
|
||||||
if (num != u8'\xff')
|
if (num != 0xFF)
|
||||||
{
|
{
|
||||||
val <<= 4;
|
val <<= 4;
|
||||||
val |= num;
|
val |= num;
|
||||||
|
Loading…
Reference in New Issue
Block a user