diff options
author | Alexey Borzenkov <[email protected]> | 2022-02-10 16:47:43 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:43 +0300 |
commit | 330c83f8c116bd45316397b179275e9d87007e7d (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /util/system/hostname.cpp | |
parent | 22d92781ba2a10b7fb5b977b7d1a5c40ff53885f (diff) |
Restoring authorship annotation for Alexey Borzenkov <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/system/hostname.cpp')
-rw-r--r-- | util/system/hostname.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util/system/hostname.cpp b/util/system/hostname.cpp index a4637404b22..386f646d6bd 100644 --- a/util/system/hostname.cpp +++ b/util/system/hostname.cpp @@ -49,13 +49,13 @@ namespace { hints.ai_flags = AI_CANONNAME; res = getaddrinfo(buf, nullptr, &hints, &ais); if (res) { - if (res != EAI_NONAME) { - ythrow TSystemError() << "can not get FQDN (return code is " << res << ", hostname is \"" << buf << "\")"; - } - FQDNHostName = buf; - } else { - FQDNHostName = ais->ai_canonname; - freeaddrinfo(ais); + if (res != EAI_NONAME) { + ythrow TSystemError() << "can not get FQDN (return code is " << res << ", hostname is \"" << buf << "\")"; + } + FQDNHostName = buf; + } else { + FQDNHostName = ais->ai_canonname; + freeaddrinfo(ais); } FQDNHostName.to_lower(); } |