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]
/
mx.c
diff --git
a/mx.c
b/mx.c
index
5a815fe
..
cf924ca
100644
(file)
--- 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;
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;
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;
#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);
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);
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 */
}
/* save changes to disk */