X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Fimap.c;h=6f5031710bd68f25a8fdae2030e63ffd84e1ca42;hb=0c12d960399d14b4143b2bb91a96bdaca64e4c56;hp=e7fcb773569e516154209abed36d827596347a68;hpb=ecaab35b973fbceb58b5ed174971c82762cc0199;p=apps%2Fmadmutt.git diff --git a/imap/imap.c b/imap/imap.c index e7fcb77..6f50317 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -18,9 +18,9 @@ #include #include #include +#include #include "mutt.h" -#include "buffer.h" #include "mx.h" #include "globals.h" #include "sort.h" @@ -975,7 +975,7 @@ int imap_sync_mailbox (CONTEXT * ctx, int expunge, int *index_hint) if ((rc = imap_check_mailbox (ctx, index_hint, 0)) != 0) return rc; - memset (&cmd, 0, sizeof (cmd)); + p_clear(&cmd, 1); /* if we are expunging anyway, we can do deleted messages very quickly... */ if (expunge && mutt_bit_isset (idata->rights, ACL_DELETE)) { @@ -1181,7 +1181,7 @@ int imap_mailbox_check (char *path, int new) * command on a mailbox that you have selected */ - if (str_cmp (mbox_unquoted, idata->mailbox) == 0 + if (m_strcmp(mbox_unquoted, idata->mailbox) == 0 || (ascii_strcasecmp (mbox_unquoted, "INBOX") == 0 && str_casecmp (mbox_unquoted, idata->mailbox) == 0)) { strfcpy (buf, "NOOP", sizeof (buf)); @@ -1345,7 +1345,7 @@ int imap_search (CONTEXT* ctx, const pattern_t* pat) { if (!do_search (pat, 1)) return 0; - memset (&buf, 0, sizeof (buf)); + p_clear(&buf, 1); mutt_buffer_addstr (&buf, "UID SEARCH "); if (imap_compile_search (pat, &buf) < 0) { p_delete(&buf.data); @@ -1457,7 +1457,7 @@ int imap_subscribe (char *path, int subscribe) imap_fix_path (idata, mx.mbox, buf, sizeof (buf)); if (option (OPTIMAPCHECKSUBSCRIBED)) { - memset (&token, 0, sizeof (token)); + p_clear(&token, 1); err.data = errstr; err.dsize = sizeof (errstr); snprintf (mbox, sizeof (mbox), "%smailboxes \"%s\"",