use more ad-hoc list handling function, and avoid to muck with ->next
[apps/madmutt.git] / sendlib.c
index e8a89a6..e92b825 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -274,7 +274,6 @@ static void encode_8bit (fgetconv_t * fc, FILE * fout, int istext)
 
 int mutt_write_mime_header (BODY * a, FILE * f)
 {
-  PARAMETER *p;
   char buffer[STRING];
   char *t;
   char *fn;
@@ -285,6 +284,8 @@ int mutt_write_mime_header (BODY * a, FILE * f)
   fprintf (f, "Content-Type: %s/%s", TYPE (a), a->subtype);
 
   if (a->parameter) {
+    PARAMETER *p;
+
     len = 25 + m_strlen(a->subtype);        /* approximate len. of content-type */
 
     for (p = a->parameter; p; p = p->next) {