1
0
forked from aniani/vim

patch 8.0.1496: clearing a pointer takes two lines

Problem:    Clearing a pointer takes two lines.
Solution:   Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi,
            closes #2629)
This commit is contained in:
Bram Moolenaar
2018-02-10 18:45:26 +01:00
parent 42443c7d7f
commit d23a823669
54 changed files with 233 additions and 465 deletions

View File

@@ -1177,8 +1177,7 @@ qf_init_ext(
int status;
/* Do not used the cached buffer, it may have been wiped out. */
vim_free(qf_last_bufname);
qf_last_bufname = NULL;
VIM_CLEAR(qf_last_bufname);
vim_memset(&state, 0, sizeof(state));
vim_memset(&fields, 0, sizeof(fields));
@@ -1229,8 +1228,7 @@ qf_init_ext(
if (last_efm == NULL || (STRCMP(last_efm, efm) != 0))
{
/* free the previously parsed data */
vim_free(last_efm);
last_efm = NULL;
VIM_CLEAR(last_efm);
free_efm_list(&fmt_first);
/* parse the current 'efm' */
@@ -1351,8 +1349,7 @@ qf_init_end:
static void
qf_store_title(qf_info_T *qi, int qf_idx, char_u *title)
{
vim_free(qi->qf_lists[qf_idx].qf_title);
qi->qf_lists[qf_idx].qf_title = NULL;
VIM_CLEAR(qi->qf_lists[qf_idx].qf_title);
if (title != NULL)
{
@@ -3003,8 +3000,7 @@ qf_free(qf_info_T *qi, int idx)
qf_free_items(qi, idx);
vim_free(qfl->qf_title);
qfl->qf_title = NULL;
VIM_CLEAR(qfl->qf_title);
free_tv(qfl->qf_ctx);
qfl->qf_ctx = NULL;
qfl->qf_id = 0;