Use p_new instead of xmalloc()
[apps/madmutt.git] / send.c
diff --git a/send.c b/send.c
index f5ffa26..3b51b00 100644 (file)
--- a/send.c
+++ b/send.c
@@ -164,7 +164,7 @@ static int edit_address (address_t ** a, const char *field)
   do {
     buf[0] = 0;
     mutt_addrlist_to_local (*a);
-    rfc822_write_address (buf, sizeof (buf), *a, 0);
+    rfc822_addrcat(buf, sizeof(buf), *a, 0);
     if (mutt_get_field (field, buf, sizeof (buf), M_ALIAS) != 0)
       return (-1);
     address_list_wipe(a);
@@ -353,7 +353,7 @@ void mutt_forward_intro (FILE * fp, HEADER * cur)
 
   fputs ("----- Forwarded message from ", fp);
   buffer[0] = 0;
-  rfc822_write_address (buffer, sizeof (buffer), cur->env->from, 1);
+  rfc822_addrcat(buffer, sizeof(buffer), cur->env->from, 1);
   fputs (buffer, fp);
   fputs (" -----\n\n", fp);
 }
@@ -910,7 +910,7 @@ void mutt_set_followup_to (ENVELOPE * e)
    from field */
 static address_t *set_reverse_name (ENVELOPE * env)
 {
-    address_t *tmp;
+    address_t *tmp = NULL;
 
     for (tmp = env->to; tmp; tmp = tmp->next) {
         if (mutt_addr_is_user(tmp))
@@ -924,6 +924,8 @@ static address_t *set_reverse_name (ENVELOPE * env)
     if (!mutt_addr_is_user(env->from))
         return NULL;
 
+    tmp = env->from;
+
   found:
     tmp = address_dup(tmp);
     if (!option(OPTREVREAL) || !tmp->personal) {