diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-05-08 21:34:46 -0300 |
---|---|---|
committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-05-19 14:50:23 -0300 |
commit | a80d7e86c1f088c5b68d8e8929cc72a0d9680f76 (patch) | |
tree | cc9cc71ee35fe966779cf6764bd5faabd1186df3 /src/nvim/if_cscope.c | |
parent | b63d2626ed9e3e38a485b9990a8e65ba59d6906a (diff) | |
download | rneovim-a80d7e86c1f088c5b68d8e8929cc72a0d9680f76.tar.gz rneovim-a80d7e86c1f088c5b68d8e8929cc72a0d9680f76.tar.bz2 rneovim-a80d7e86c1f088c5b68d8e8929cc72a0d9680f76.zip |
Remove NULL/non-NULL tests after calls to vim_str(n)save()
Diffstat (limited to 'src/nvim/if_cscope.c')
-rw-r--r-- | src/nvim/if_cscope.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index 8b52fb521f..4e08f08bc0 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -1633,10 +1633,7 @@ static void cs_fill_results(char *tagstr, int totmatches, int *nummatches_a, cha if (strcmp(cntx, "<global>") == 0) cntxts[totsofar] = NULL; else { - /* note: if vim_strsave returns NULL, then the context - * will be "<global>", which is misleading. - */ - cntxts[totsofar] = (char *)vim_strsave((char_u *)cntx); + cntxts[totsofar] = xstrdup(cntx); } totsofar++; @@ -2110,7 +2107,7 @@ static char *cs_resolve_file(int i, char *name) * cscope output. */ fullname = (char *)concat_fnames(csdir, (char_u *)name, TRUE); } else { - fullname = (char *)vim_strsave((char_u *)name); + fullname = xstrdup(name); } free(csdir); |