From a80faa8930ed5a554beeb2727762538873135e83 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 12 Apr 2020 19:37:17 +0200 Subject: patch 8.2.0559: clearing a struct is verbose Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER(). --- src/ex_cmds2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ex_cmds2.c') diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 59f04a59a8..a0f383982f 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -168,7 +168,7 @@ dialog_changed( // Init ea pseudo-structure, this is needed for the check_overwrite() // function. - vim_memset(&ea, 0, sizeof(ea)); + CLEAR_FIELD(ea); if (ret == VIM_YES) { @@ -889,7 +889,7 @@ source_pyx_file(exarg_T *eap, char_u *fname) * unobtrusive message. */ if (eap == NULL) - vim_memset(&ex, 0, sizeof(ex)); + CLEAR_FIELD(ex); else ex = *eap; ex.arg = fname; -- cgit v1.2.3