]> granicus.if.org Git - mutt/commitdiff
Simplify host resolution code slightly.
authorEmanuele Giaquinta <e.giaquinta@glauco.it>
Mon, 29 Sep 2008 21:31:45 +0000 (14:31 -0700)
committerEmanuele Giaquinta <e.giaquinta@glauco.it>
Mon, 29 Sep 2008 21:31:45 +0000 (14:31 -0700)
mutt_socket.c

index 4c1b96e868ae35ce5aba3498b5f05d1df5eef342..4d9f499d467256842bc834dc4390f8bc6d13a7b1 100644 (file)
@@ -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;