mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 9.0.1391: "clear" macros are not always used
Problem: "clear" macros are not always used. Solution: Use ALLOC_ONE, VIM_CLEAR, CLEAR_POINTER and CLEAR_FIELD in more places. (Yegappan Lakshmanan, closes #12104)
This commit is contained in:
committed by
Bram Moolenaar
parent
14113fdf9c
commit
960dcbd098
@@ -2714,13 +2714,7 @@ did_set_varsofttabstop(optset_T *args)
|
||||
char_u *cp;
|
||||
|
||||
if (!((*varp)[0]) || ((*varp)[0] == '0' && !((*varp)[1])))
|
||||
{
|
||||
if (curbuf->b_p_vsts_array)
|
||||
{
|
||||
vim_free(curbuf->b_p_vsts_array);
|
||||
curbuf->b_p_vsts_array = 0;
|
||||
}
|
||||
}
|
||||
VIM_CLEAR(curbuf->b_p_vsts_array);
|
||||
else
|
||||
{
|
||||
for (cp = *varp; *cp; ++cp)
|
||||
@@ -2755,13 +2749,7 @@ did_set_vartabstop(optset_T *args)
|
||||
char_u *cp;
|
||||
|
||||
if (!((*varp)[0]) || ((*varp)[0] == '0' && !((*varp)[1])))
|
||||
{
|
||||
if (curbuf->b_p_vts_array)
|
||||
{
|
||||
vim_free(curbuf->b_p_vts_array);
|
||||
curbuf->b_p_vts_array = NULL;
|
||||
}
|
||||
}
|
||||
VIM_CLEAR(curbuf->b_p_vts_array);
|
||||
else
|
||||
{
|
||||
for (cp = *varp; *cp; ++cp)
|
||||
|
Reference in New Issue
Block a user