]> granicus.if.org Git - neomutt/commitdiff
Reduce variable scope - conn/getdomain.c
authorFederico Kircheis <federico.kircheis@gmail.com>
Thu, 1 Mar 2018 17:33:32 +0000 (18:33 +0100)
committerRichard Russon <rich@flatcap.org>
Sat, 3 Mar 2018 12:33:02 +0000 (12:33 +0000)
conn/getdomain.c

index 27c970df18af9a7c723d8ba7441f9c3ff5efd58e..0ed11f63ef46b2af59a39d6522ff16499e54f2c2 100644 (file)
@@ -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)