mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 21:18:34 +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:
@@ -333,7 +333,7 @@ static int str_to_mapargs(const char_u *strargs, bool is_unmap, MapArguments *ma
|
||||
{
|
||||
const char_u *to_parse = strargs;
|
||||
to_parse = (char_u *)skipwhite((char *)to_parse);
|
||||
memset(mapargs, 0, sizeof(*mapargs));
|
||||
CLEAR_POINTER(mapargs);
|
||||
|
||||
// Accept <buffer>, <nowait>, <silent>, <expr>, <script>, and <unique> in
|
||||
// any order.
|
||||
|
Reference in New Issue
Block a user