use m_strdup and m_strlen that are inlined for efficiency
[apps/madmutt.git] / mutt_socket.c
index 1a02f24..2c49da9 100644 (file)
@@ -14,6 +14,7 @@
 #endif
 
 #include <lib-lib/mem.h>
+#include <lib-lib/str.h>
 #include <lib-lib/macros.h>
 
 #include "mutt.h"
@@ -26,7 +27,6 @@
 
 #include "mutt_idna.h"
 
-#include "lib/str.h"
 #include "lib/debug.h"
 
 #include <unistd.h>
@@ -104,7 +104,7 @@ int mutt_socket_write_d (CONNECTION * conn, const char *buf, int dbg)
     return -1;
   }
 
-  len = str_len (buf);
+  len = m_strlen(buf);
   if ((rc = conn->conn_write (conn, buf, len)) < 0) {
     debug_print (1, ("error writing, closing socket\n"));
     mutt_socket_close (conn);
@@ -170,7 +170,7 @@ int mutt_socket_readln_d (char *buf, size_t buflen, CONNECTION * conn,
 
   debug_print (dbg, ("< %s\n", buf));
 
-  /* number of bytes read, not str_len */
+  /* number of bytes read, not m_strlen*/
   return i + 1;
 }
 
@@ -267,7 +267,7 @@ static int socket_preconnect (void)
   int rc;
   int save_errno;
 
-  if (str_len (Preconnect)) {
+  if (m_strlen(Preconnect)) {
     debug_print (2, ("Executing preconnect: %s\n", Preconnect));
     rc = mutt_system (Preconnect);
     debug_print (2, ("Preconnect result: %d\n", rc));