simplify count_body_parts drastically.
[apps/madmutt.git] / mutt_socket.c
index 2c49da9..664f61f 100644 (file)
@@ -145,11 +145,11 @@ int mutt_socket_readchar (CONNECTION * conn, char *c)
   return 1;
 }
 
-int mutt_socket_readln_d (char *buf, size_t buflen, CONNECTION * conn,
+int mutt_socket_readln_d (char *buf, ssize_t buflen, CONNECTION * conn,
                           int dbg)
 {
   char ch;
-  int i;
+  ssize_t i;
 
   for (i = 0; i < buflen - 1; i++) {
     if (mutt_socket_readchar (conn, &ch) != 1) {
@@ -379,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;
@@ -439,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;