X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Fimap.c;h=2a4feca0cb156a28df1207c39b873f93f01d5089;hb=1c16e9623a9fb6a15bb284a6f7322b583ebc06a7;hp=e7fcb773569e516154209abed36d827596347a68;hpb=ecaab35b973fbceb58b5ed174971c82762cc0199;p=apps%2Fmadmutt.git diff --git a/imap/imap.c b/imap/imap.c index e7fcb77..2a4feca 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" @@ -785,12 +785,13 @@ int imap_close_connection (CONTEXT *ctx) /* imap_set_flag: append str to flags if we currently have permission * according to aclbit */ -static void imap_set_flag (IMAP_DATA * idata, int aclbit, int flag, - const char *str, char *flags, size_t flsize) +static void imap_set_flag(IMAP_DATA *idata, int aclbit, int flag, + const char *str, char *flags, size_t flsize) { - if (mutt_bit_isset (idata->rights, aclbit)) - if (flag) - str_cat (flags, flsize, str); + if (mutt_bit_isset(idata->rights, aclbit)) { + if (flag) + m_strcat(flags, flsize, str); + } } /* imap_make_msg_set: make an IMAP4rev1 UID message set out of a set of @@ -975,7 +976,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 +1182,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 +1346,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 +1458,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\"",