patch 8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
diff --git a/src/findfile.c b/src/findfile.c
index ba996c4..a6bec97 100644
--- a/src/findfile.c
+++ b/src/findfile.c
@@ -320,10 +320,9 @@
search_ctx = search_ctx_arg;
else
{
- search_ctx = ALLOC_ONE(ff_search_ctx_T);
+ search_ctx = ALLOC_CLEAR_ONE(ff_search_ctx_T);
if (search_ctx == NULL)
goto error_return;
- vim_memset(search_ctx, 0, sizeof(ff_search_ctx_T));
}
search_ctx->ffsc_find_what = find_what;
search_ctx->ffsc_tagfile = tagfile;