oops, makedoc is used in the build process.
[apps/madmutt.git] / mutt_socket.c
index 9029b3e..6bac9d4 100644 (file)
@@ -13,6 +13,8 @@
 # include "config.h"
 #endif
 
+#include <lib-lib/mem.h>
+
 #include "mutt.h"
 #include "globals.h"
 #include "mutt_socket.h"
@@ -23,7 +25,6 @@
 
 #include "mutt_idna.h"
 
-#include "lib/mem.h"
 #include "lib/intl.h"
 #include "lib/str.h"
 #include "lib/debug.h"
@@ -189,7 +190,7 @@ void mutt_socket_free (CONNECTION * conn)
   /* head is special case, doesn't need prev updated */
   if (iter == conn) {
     Connections = iter->next;
-    mem_free (&iter);
+    p_delete(&iter);
     return;
   }
 
@@ -197,7 +198,7 @@ void mutt_socket_free (CONNECTION * conn)
     if (iter->next == conn) {
       tmp = iter->next;
       iter->next = tmp->next;
-      mem_free (&tmp);
+      p_delete(&tmp);
       return;
     }
     iter = iter->next;
@@ -324,7 +325,7 @@ static CONNECTION *socket_new_conn (void)
 {
   CONNECTION *conn;
 
-  conn = (CONNECTION *) mem_calloc (1, sizeof (CONNECTION));
+  conn = p_new(CONNECTION, 1);
   conn->fd = -1;
 
   return conn;
@@ -404,7 +405,7 @@ int raw_socket_open (CONNECTION * conn)
   rc = getaddrinfo (host_idna, port, &hints, &res);
 
 # ifdef HAVE_LIBIDN
-  mem_free (&host_idna);
+  p_delete(&host_idna);
 # endif
 
   if (rc) {
@@ -455,7 +456,7 @@ int raw_socket_open (CONNECTION * conn)
 
   if ((he = gethostbyname (host_idna)) == NULL) {
 # ifdef HAVE_LIBIDN
-    mem_free (&host_idna);
+    p_delete(&host_idna);
 # endif
     mutt_error (_("Could not find the host \"%s\""), conn->account.host);
 
@@ -463,7 +464,7 @@ int raw_socket_open (CONNECTION * conn)
   }
 
 # ifdef HAVE_LIBIDN
-  mem_free (&host_idna);
+  p_delete(&host_idna);
 # endif
 
   mutt_message (_("Connecting to %s..."), conn->account.host);