mirror of
https://github.com/vim/vim.git
synced 2025-10-06 05:44:14 -04:00
patch 8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user