mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +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:
@@ -300,10 +300,10 @@ String nvim_cmd(uint64_t channel_id, Dict(cmd) *cmd, Dict(cmd_opts) *opts, Error
|
||||
FUNC_API_SINCE(10)
|
||||
{
|
||||
exarg_T ea;
|
||||
memset(&ea, 0, sizeof(ea));
|
||||
CLEAR_FIELD(ea);
|
||||
|
||||
CmdParseInfo cmdinfo;
|
||||
memset(&cmdinfo, 0, sizeof(cmdinfo));
|
||||
CLEAR_FIELD(cmdinfo);
|
||||
|
||||
char *cmdline = NULL;
|
||||
char *cmdname = NULL;
|
||||
|
Reference in New Issue
Block a user