refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)

vim-patch:8.2.0559: clearing a struct is verbose

Problem:    Clearing a struct is verbose.
Solution:   Define and use CLEAR_FIELD() and CLEAR_POINTER().
a80faa8930
This commit is contained in:
zeertzjq
2022-08-11 15:44:55 +08:00
committed by GitHub
parent 252dea5927
commit 94c3176478
45 changed files with 144 additions and 142 deletions

View File

@@ -1418,7 +1418,7 @@ scripterror:
* copied, so that they can be changed. */
static void init_params(mparm_T *paramp, int argc, char **argv)
{
memset(paramp, 0, sizeof(*paramp));
CLEAR_POINTER(paramp);
paramp->argc = argc;
paramp->argv = argv;
paramp->use_debug_break_level = -1;