Skip to content

Commit e85ae9f

Browse files
author
Vadim Averin
committed
Small fixes
1 parent 9b491a6 commit e85ae9f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ydb/library/yql/udfs/common/ip_base/lib/ip_base_udf.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ namespace {
9595

9696
static TRawIp6 MaskFromPrefix(ui8 prefix) {
9797
ui128 x = ui128(-1) << int(128 - prefix);
98-
if (prefix == 0) x = ui128(-1);
98+
if (prefix == 0) x = 0;
9999
return FromIpAddress({x, TIpv6Address::Ipv6});
100100
}
101101

@@ -187,7 +187,7 @@ namespace {
187187
memcpy(&subnet4, str.Data(), sizeof subnet4);
188188
range = subnet4.ToIpRange();
189189
} else if (str.Size() == sizeof(TRawIp6Subnet)) {
190-
TRawIp4Subnet subnet6;
190+
TRawIp6Subnet subnet6;
191191
memcpy(&subnet6, str.Data(), sizeof subnet6);
192192
range = subnet6.ToIpRange();
193193
} else {
@@ -245,7 +245,7 @@ namespace {
245245
SIMPLE_UDF(TSubnetToString, char*(TAutoMapString)) {
246246
TStringBuilder result;
247247
auto range = DeserializeSubnet(args[0].AsStringRef());
248-
result << (*range.Begin()).ToString();
248+
result << (*range.Begin()).ToString(false);
249249
result << '/';
250250
result << ToString(GetAddressRangePrefix(range));
251251
return valueBuilder->NewString(result);

0 commit comments

Comments
 (0)