From 0d7425fe9eb1cf7e7da38cfcb753e536434e293c Mon Sep 17 00:00:00 2001 From: Federico Kircheis Date: Thu, 1 Mar 2018 18:33:32 +0100 Subject: [PATCH] Reduce variable scope - conn/getdomain.c --- conn/getdomain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) -- 2.50.1