aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memfile.c
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-08-19 12:26:08 -0600
committerJosh Rahm <rahm@google.com>2022-08-19 13:06:41 -0600
commita7237662f96933efe29eed8212464571e3778cd0 (patch)
tree27930202726b4251437c8cfa53069f65b4db90dc /src/nvim/memfile.c
parent02292344929069ea63c0bb872cc22d552d86b67f (diff)
parentb2f979b30beac67906b2dd717fcb6a34f46f5e54 (diff)
downloadrneovim-tmp.tar.gz
rneovim-tmp.tar.bz2
rneovim-tmp.zip
Merge branch 'master' of https://github.com/neovim/neovim into rahmtmp
Diffstat (limited to 'src/nvim/memfile.c')
-rw-r--r--src/nvim/memfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/memfile.c b/src/nvim/memfile.c
index c828334eaf..216ee26620 100644
--- a/src/nvim/memfile.c
+++ b/src/nvim/memfile.c
@@ -821,7 +821,7 @@ static bool mf_do_open(memfile_T *mfp, char_u *fname, int flags)
/// Initialize an empty hash table.
static void mf_hash_init(mf_hashtab_T *mht)
{
- memset(mht, 0, sizeof(mf_hashtab_T));
+ CLEAR_POINTER(mht);
mht->mht_buckets = mht->mht_small_buckets;
mht->mht_mask = MHT_INIT_SIZE - 1;
}
@@ -924,7 +924,7 @@ static void mf_hash_grow(mf_hashtab_T *mht)
/// a power of two.
mf_hashitem_T *tails[MHT_GROWTH_FACTOR];
- memset(tails, 0, sizeof(tails));
+ CLEAR_FIELD(tails);
for (mf_hashitem_T *mhi = mht->mht_buckets[i];
mhi != NULL; mhi = mhi->mhi_next) {