use safer p_clear when possible.
[apps/madmutt.git] / recvattach.c
index 76f5185..99a8917 100644 (file)
@@ -647,7 +647,7 @@ void mutt_pipe_attachment_list (FILE * fp, int tag, BODY * top, int filter)
     filter = 0;                 /* sanity check: we can't filter in the recv case yet */
 
   buf[0] = 0;
-  memset (&state, 0, sizeof (STATE));
+  p_clear(&state, 1);
 
   if (mutt_get_field ((filter ? _("Filter through: ") : _("Pipe to: ")),
                       buf, sizeof (buf), M_CMD) != 0 || !buf[0])
@@ -751,7 +751,7 @@ void mutt_print_attachment_list (FILE * fp, int tag, BODY * top)
     if (!can_print (top, tag))
       return;
     mutt_endwin (NULL);
-    memset (&state, 0, sizeof (STATE));
+    p_clear(&state, 1);
     thepid = mutt_create_filter (NONULL (PrintCmd), &state.fpout, NULL, NULL);
     print_attachment_list (fp, tag, top, &state);
     fclose (state.fpout);