From: Federico Kircheis Date: Thu, 1 Mar 2018 17:33:32 +0000 (+0100) Subject: Reduce variable scope - conn/getdomain.c X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d7425fe9eb1cf7e7da38cfcb753e536434e293c;p=neomutt Reduce variable scope - conn/getdomain.c --- diff --git a/conn/getdomain.c b/conn/getdomain.c index 27c970df1..0ed11f63e 100644 --- a/conn/getdomain.c +++ b/conn/getdomain.c @@ -70,7 +70,6 @@ int getdnsdomainname(char *d, size_t len) * If it takes longer, the system is mis-configured and the network is not * working properly, so... */ - int status; struct timespec timeout = { 0, 100000000 }; struct gaicb *reqs[1]; reqs[0] = mutt_mem_calloc(1, sizeof(*reqs[0])); @@ -79,7 +78,7 @@ int getdnsdomainname(char *d, size_t len) if (getaddrinfo_a(GAI_NOWAIT, reqs, 1, NULL) == 0) { gai_suspend((const struct gaicb *const *) reqs, 1, &timeout); - status = gai_error(reqs[0]); + const int status = gai_error(reqs[0]); if (status == 0) h = reqs[0]->ar_result; else if (status == EAI_INPROGRESS)