Minor improvements.
GitOrigin-RevId: 8942b7461a1c83f963510c9884cd003948967fd0
This commit is contained in:
parent
416188fc67
commit
c89412e175
@ -10,11 +10,10 @@
|
||||
|
||||
#include "td/utils/buffer.h"
|
||||
#include "td/utils/common.h"
|
||||
#include "td/utils/port/IPAddress.h"
|
||||
#include "td/utils/Slice.h"
|
||||
#include "td/utils/StringBuilder.h"
|
||||
|
||||
#include "td/utils/port/IPAddress.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace td {
|
||||
|
@ -244,7 +244,7 @@ size_t IPAddress::get_sockaddr_len() const {
|
||||
case AF_INET:
|
||||
return sizeof(ipv4_addr_);
|
||||
default:
|
||||
LOG(FATAL) << "Unknown address family";
|
||||
UNREACHABLE();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -284,7 +284,8 @@ IPAddress IPAddress::get_any_addr() const {
|
||||
res.init_ipv4_any();
|
||||
break;
|
||||
default:
|
||||
LOG(FATAL) << "Unknown address family";
|
||||
UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@ -609,7 +610,7 @@ bool operator==(const IPAddress &a, const IPAddress &b) {
|
||||
std::memcmp(&a.ipv6_addr_.sin6_addr, &b.ipv6_addr_.sin6_addr, sizeof(a.ipv6_addr_.sin6_addr)) == 0;
|
||||
}
|
||||
|
||||
LOG(FATAL) << "Unknown address family";
|
||||
UNREACHABLE();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -633,7 +634,7 @@ bool operator<(const IPAddress &a, const IPAddress &b) {
|
||||
return std::memcmp(&a.ipv6_addr_.sin6_addr, &b.ipv6_addr_.sin6_addr, sizeof(a.ipv6_addr_.sin6_addr)) < 0;
|
||||
}
|
||||
|
||||
LOG(FATAL) << "Unknown address family";
|
||||
UNREACHABLE();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user