From b63c8a598e88ae9770f19c91a433b7748a7db9d9 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Mon, 29 Sep 2008 14:31:45 -0700 Subject: [PATCH] Simplify host resolution code slightly. --- mutt_socket.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mutt_socket.c b/mutt_socket.c index 4c1b96e8..4d9f499d 100644 --- a/mutt_socket.c +++ b/mutt_socket.c @@ -528,20 +528,18 @@ int raw_socket_open (CONNECTION* conn) mutt_message (_("Looking up %s..."), conn->account.host); - if ((he = gethostbyname (host_idna)) == NULL) - { + he = gethostbyname (host_idna); + # ifdef HAVE_LIBIDN FREE (&host_idna); # endif + + if (! he) { mutt_error (_("Could not find the host \"%s\""), conn->account.host); return -1; } -# ifdef HAVE_LIBIDN - FREE (&host_idna); -# endif - mutt_message (_("Connecting to %s..."), conn->account.host); rc = -1; -- 2.40.0