diff options
author | Ihor Antonov <ngortheone@users.noreply.github.com> | 2019-08-13 14:52:25 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-08-13 20:52:25 +0200 |
commit | 947bd293c98eda680c0e89b2d453b91eeda54272 (patch) | |
tree | 0f3d99f354bf5428dceb847924f8b46faa708e7b /src | |
parent | 5e1acd412bce4824d6e2d83c17cc378963c64f10 (diff) | |
download | rneovim-947bd293c98eda680c0e89b2d453b91eeda54272.tar.gz rneovim-947bd293c98eda680c0e89b2d453b91eeda54272.tar.bz2 rneovim-947bd293c98eda680c0e89b2d453b91eeda54272.zip |
clang/"null pointer dereference" #10755
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/edit.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 2ac429cf9e..fde84024b3 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3672,28 +3672,28 @@ static buf_T *ins_compl_next_buf(buf_T *buf, int flag) } -/* - * Execute user defined complete function 'completefunc' or 'omnifunc', and - * get matches in "matches". - */ +// Execute user defined complete function 'completefunc' or 'omnifunc', and +// get matches in "matches". static void -expand_by_function ( - int type, /* CTRL_X_OMNI or CTRL_X_FUNCTION */ +expand_by_function( + int type, // CTRL_X_OMNI or CTRL_X_FUNCTION char_u *base ) { - list_T *matchlist = NULL; - dict_T *matchdict = NULL; - char_u *funcname; + list_T *matchlist = NULL; + dict_T *matchdict = NULL; + char_u *funcname; pos_T pos; - win_T *curwin_save; - buf_T *curbuf_save; + win_T *curwin_save; + buf_T *curbuf_save; typval_T rettv; const int save_State = State; + assert(curbuf != NULL); funcname = (type == CTRL_X_FUNCTION) ? curbuf->b_p_cfu : curbuf->b_p_ofu; - if (*funcname == NUL) + if (*funcname == NUL) { return; + } // Call 'completefunc' to obtain the list of matches. typval_T args[3]; |