projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use safer p_clear when possible.
[apps/madmutt.git]
/
imap
/
imap.c
diff --git
a/imap/imap.c
b/imap/imap.c
index
e7fcb77
..
3945456
100644
(file)
--- a/
imap/imap.c
+++ b/
imap/imap.c
@@
-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;
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)) {
/* if we are expunging anyway, we can do deleted messages very quickly... */
if (expunge && mutt_bit_isset (idata->rights, ACL_DELETE)) {
@@
-1345,7
+1345,7
@@
int imap_search (CONTEXT* ctx, const pattern_t* pat) {
if (!do_search (pat, 1))
return 0;
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);
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)) {
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\"",
err.data = errstr;
err.dsize = sizeof (errstr);
snprintf (mbox, sizeof (mbox), "%smailboxes \"%s\"",