X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mx.c;h=cf924ca9cad7d69b295db99c36685b7eb5d6022b;hp=5a815fed235d52bc936a25d20613e1d8a2d14bdb;hb=9274cbe8e6410ddb95ddc667faa678a29da85420;hpb=c22c84b23ab59c81ccd397c992b1c4adbbddeb80 diff --git a/mx.c b/mx.c index 5a815fe..cf924ca 100644 --- a/mx.c +++ b/mx.c @@ -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 */