summaryrefslogtreecommitdiff
path: root/src/regexp_nfa.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/regexp_nfa.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/regexp_nfa.c')
-rw-r--r--src/regexp_nfa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 67d4af2f6..26a8f356b 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -4564,7 +4564,7 @@ skip_add:
// avoid compiler warnings
save_ptr = NULL;
- vim_memset(&save_multipos, 0, sizeof(save_multipos));
+ CLEAR_FIELD(save_multipos);
// Set the position (with "off" added) in the subexpression. Save
// and restore it when it was in use. Otherwise fill any gap.
@@ -4717,7 +4717,7 @@ skip_add:
save_ptr = sub->list.line[subidx].end;
sub->list.line[subidx].end = rex.input + off;
// avoid compiler warnings
- vim_memset(&save_multipos, 0, sizeof(save_multipos));
+ CLEAR_FIELD(save_multipos);
}
subs = addstate(l, state->out, subs, pim, off_arg);