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:
@@ -317,8 +317,8 @@ channel_still_useful(channel_T *channel)
|
||||
/* If there is no callback then nobody can get readahead. If the fd is
|
||||
* closed and there is no readahead then the callback won't be called. */
|
||||
has_sock_msg = channel->ch_part[PART_SOCK].ch_fd != INVALID_FD
|
||||
|| channel->ch_part[PART_SOCK].ch_head.rq_next != NULL
|
||||
|| channel->ch_part[PART_SOCK].ch_json_head.jq_next != NULL;
|
||||
|| channel->ch_part[PART_SOCK].ch_head.rq_next != NULL
|
||||
|| channel->ch_part[PART_SOCK].ch_json_head.jq_next != NULL;
|
||||
has_out_msg = channel->ch_part[PART_OUT].ch_fd != INVALID_FD
|
||||
|| channel->ch_part[PART_OUT].ch_head.rq_next != NULL
|
||||
|| channel->ch_part[PART_OUT].ch_json_head.jq_next != NULL;
|
||||
@@ -2978,8 +2978,7 @@ channel_clear_one(channel_T *channel, ch_part_T part)
|
||||
channel_clear(channel_T *channel)
|
||||
{
|
||||
ch_log(channel, "Clearing channel");
|
||||
vim_free(channel->ch_hostname);
|
||||
channel->ch_hostname = NULL;
|
||||
VIM_CLEAR(channel->ch_hostname);
|
||||
channel_clear_one(channel, PART_SOCK);
|
||||
channel_clear_one(channel, PART_OUT);
|
||||
channel_clear_one(channel, PART_ERR);
|
||||
|
Reference in New Issue
Block a user