aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/if_cscope.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/if_cscope.c')
-rw-r--r--src/nvim/if_cscope.c7
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);