X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Fimap.c;h=6f5031710bd68f25a8fdae2030e63ffd84e1ca42;hb=2ea77d3b2827ba23feb756ce2fb936565ae38998;hp=03ef51385b19d5f3d92ae821dcc27a4d9b487d73;hpb=7f7a0be369840b290248e5b0302beb447fa1b3cd;p=apps%2Fmadmutt.git diff --git a/imap/imap.c b/imap/imap.c index 03ef513..6f50317 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -16,11 +16,11 @@ #endif #include +#include #include +#include #include "mutt.h" -#include "ascii.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\"",