summaryrefslogtreecommitdiff
path: root/louloulibs
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-03-08 19:04:54 +0100
committerlouiz’ <louiz@louiz.org>2017-03-08 19:04:54 +0100
commit0205076106604372e79130691dcfb7aca15b5055 (patch)
treee0f191f0e25dbf836ed5b02ebb69b5f45da4fd12 /louloulibs
parentf0bc6c83a8eb548d0a3edbf7c16a6922bfd24ba5 (diff)
downloadbiboumi-0205076106604372e79130691dcfb7aca15b5055.tar.gz
biboumi-0205076106604372e79130691dcfb7aca15b5055.tar.bz2
biboumi-0205076106604372e79130691dcfb7aca15b5055.tar.xz
biboumi-0205076106604372e79130691dcfb7aca15b5055.zip
Reduce the scope of a variable
Diffstat (limited to 'louloulibs')
-rw-r--r--louloulibs/network/resolver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/louloulibs/network/resolver.cpp b/louloulibs/network/resolver.cpp
index 27a515e..3558800 100644
--- a/louloulibs/network/resolver.cpp
+++ b/louloulibs/network/resolver.cpp
@@ -200,12 +200,12 @@ void Resolver::on_hostname4_resolved(dns_rr_a4 *result)
void Resolver::on_hostname6_resolved(dns_rr_a6 *result)
{
this->resolved6 = true;
- char buf[INET6_ADDRSTRLEN];
const auto status = dns_status(nullptr);
if (status >= 0 && result)
{
+ char buf[INET6_ADDRSTRLEN];
for (auto i = 0; i < result->dnsa6_nrr; ++i)
{
inet_ntop(AF_INET6, &result->dnsa6_addr[i], buf, sizeof(buf));