mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +00:00
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:
@@ -1308,7 +1308,7 @@ char *get_lval(char *const name, typval_T *const rettv, lval_T *const lp, const
|
||||
int quiet = flags & GLV_QUIET;
|
||||
|
||||
// Clear everything in "lp".
|
||||
memset(lp, 0, sizeof(lval_T));
|
||||
CLEAR_POINTER(lp);
|
||||
|
||||
if (skip) {
|
||||
// When skipping just find the end of the name.
|
||||
|
Reference in New Issue
Block a user