X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_socket.c;h=e5fc1a3dcd0ec22d4af7ad8fb5ef152a7ab9a1d8;hp=1c3d8650d855f8c44cdb0ffe79c863abf3babdf4;hb=9342efc81d163ea56e079b4adf2ce17c41c853b0;hpb=b3cb6ed8d36c550a2e589910ce51bbc8352ff57c diff --git a/mutt_socket.c b/mutt_socket.c index 1c3d865..e5fc1a3 100644 --- a/mutt_socket.c +++ b/mutt_socket.c @@ -14,6 +14,8 @@ #endif #include +#include +#include #include "mutt.h" #include "globals.h" @@ -25,9 +27,6 @@ #include "mutt_idna.h" -#include "lib/mem.h" -#include "lib/intl.h" -#include "lib/str.h" #include "lib/debug.h" #include @@ -105,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); @@ -171,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; } @@ -268,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)); @@ -380,7 +379,7 @@ int raw_socket_open (CONNECTION * conn) struct addrinfo *cur; /* we accept v4 or v6 STREAM sockets */ - memset (&hints, 0, sizeof (hints)); + p_clear(&hints, 1); if (option (OPTUSEIPV6)) hints.ai_family = AF_UNSPEC; @@ -440,7 +439,7 @@ int raw_socket_open (CONNECTION * conn) struct hostent *he; int i; - memset (&sin, 0, sizeof (sin)); + p_clear(&sin, 1); sin.sin_port = htons (conn->account.port); sin.sin_family = AF_INET;