summaryrefslogtreecommitdiff
path: root/src/memfile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-12 19:37:17 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-12 19:37:17 +0200
commita80faa8930ed5a554beeb2727762538873135e83 (patch)
treee797605e0c781214543fcba103cffede7af611cd /src/memfile.c
parent82de464f763d6e6d89229be03ce7c6d02fd5fb59 (diff)
downloadvim-git-a80faa8930ed5a554beeb2727762538873135e83.tar.gz
patch 8.2.0559: clearing a struct is verbosev8.2.0559
Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
Diffstat (limited to 'src/memfile.c')
-rw-r--r--src/memfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/memfile.c b/src/memfile.c
index 0d167e6b0..4fe329439 100644
--- a/src/memfile.c
+++ b/src/memfile.c
@@ -1337,7 +1337,7 @@ mf_do_open(
static void
mf_hash_init(mf_hashtab_T *mht)
{
- vim_memset(mht, 0, sizeof(mf_hashtab_T));
+ CLEAR_POINTER(mht);
mht->mht_buckets = mht->mht_small_buckets;
mht->mht_mask = MHT_INIT_SIZE - 1;
}
@@ -1480,7 +1480,7 @@ mf_hash_grow(mf_hashtab_T *mht)
* a power of two.
*/
- vim_memset(tails, 0, sizeof(tails));
+ CLEAR_FIELD(tails);
for (mhi = mht->mht_buckets[i]; mhi != NULL; mhi = mhi->mhi_next)
{