X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mx.c;h=cf924ca9cad7d69b295db99c36685b7eb5d6022b;hp=4160eeba2e767faaa797f86b00563ab5d0367aca;hb=9aae63e2d1cce39bb0928362416a8d17b953ca5e;hpb=7f7a0be369840b290248e5b0302beb447fa1b3cd diff --git a/mx.c b/mx.c index 4160eeb..cf924ca 100644 --- a/mx.c +++ b/mx.c @@ -13,12 +13,12 @@ #endif #include +#include #include #include #include "mutt.h" #include "buffy.h" -#include "ascii.h" #include "mx.h" #include "mbox.h" #include "mh.h" @@ -193,7 +193,7 @@ int mx_lock_file (const char *path, int fd, int excl, int dot, int timeout) struct flock lck; - memset (&lck, 0, sizeof (struct flock)); + p_clear(&lck, 1); lck.l_type = excl ? F_WRLCK : F_RDLCK; lck.l_whence = SEEK_SET; @@ -294,7 +294,7 @@ int mx_unlock_file (const char *path, int fd, int dot) #ifdef USE_FCNTL struct flock unlockit; - memset (&unlockit, 0, sizeof (struct flock)); + p_clear(&unlockit, 1); unlockit.l_type = F_UNLCK; unlockit.l_whence = SEEK_SET; fcntl (fd, F_SETLK, &unlockit); @@ -625,7 +625,7 @@ void mx_fastclose_mailbox (CONTEXT * ctx) if (ctx->limit_pattern) mutt_pattern_free (&ctx->limit_pattern); safe_fclose (&ctx->fp); - memset (ctx, 0, sizeof (CONTEXT)); + p_clear(ctx, 1); } /* save changes to disk */