Mercurial > vim
diff src/os_unix.c @ 13244:ac42c4b11dbc v8.0.1496
patch 8.0.1496: clearing a pointer takes two lines
commit https://github.com/vim/vim/commit/d23a823669d93fb2a570a039173eefe4856ac806
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 10 18:45:26 2018 +0100
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 10 Feb 2018 19:00:07 +0100 |
parents | 1bdc12630fc0 |
children | 0bc67f4e2947 |
line wrap: on
line diff
--- a/src/os_unix.c +++ b/src/os_unix.c @@ -371,7 +371,7 @@ mch_chdir(char *path) #endif /* - * Write s[len] to the screen. + * Write s[len] to the screen (stdout). */ void mch_write(char_u *s, int len) @@ -1311,8 +1311,7 @@ mch_suspend(void) /* * Set oldtitle to NULL, so the current title is obtained again. */ - vim_free(oldtitle); - oldtitle = NULL; + VIM_CLEAR(oldtitle); # endif settmode(TMODE_RAW); need_check_timestamps = TRUE; @@ -3261,8 +3260,7 @@ mch_free_mem(void) XCloseDisplay(x11_display); # endif # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK) - vim_free(signal_stack); - signal_stack = NULL; + VIM_CLEAR(signal_stack); # endif # ifdef FEAT_TITLE vim_free(oldtitle); @@ -6765,8 +6763,7 @@ mch_expand_wildcards( if (*num_file == 0) /* rejected all entries */ { - vim_free(*file); - *file = NULL; + VIM_CLEAR(*file); goto notfound; }