diff options
Diffstat (limited to 'net/base/net_util.cc')
-rw-r--r-- | net/base/net_util.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/base/net_util.cc b/net/base/net_util.cc index 6171db3..7865b4e 100644 --- a/net/base/net_util.cc +++ b/net/base/net_util.cc @@ -1024,13 +1024,12 @@ std::string NetAddressToString(const struct addrinfo* net_address) { return std::string(buffer); } -std::string GetMyHostName() { +std::string GetHostName() { #if defined(OS_WIN) EnsureWinsockInit(); #endif - // Maximum size of 256 is somewhat arbitrary. Mozilla uses a size of 100 - // so this should cover the majority of cases. + // Host names are limited to 255 bytes. char buffer[256]; int result = gethostname(buffer, sizeof(buffer)); if (result != 0) { |