aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/file_search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/file_search.c')
-rw-r--r--src/nvim/file_search.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c
index d91e2dfeeb..6782c0211b 100644
--- a/src/nvim/file_search.c
+++ b/src/nvim/file_search.c
@@ -182,7 +182,7 @@ typedef struct ff_search_ctx_T {
# include "file_search.c.generated.h"
#endif
-static char e_pathtoolong[] = N_("E854: path too long for completion");
+static const char e_pathtoolong[] = N_("E854: path too long for completion");
/// Initialization routine for vim_findfile().
///
@@ -1117,28 +1117,28 @@ static int ff_check_visited(ff_visited_T **visited_list, char *fname, char *wc_p
static ff_stack_T *ff_create_stack_element(char *fix_part, char *wc_part, int level,
int star_star_empty)
{
- ff_stack_T *new = xmalloc(sizeof(ff_stack_T));
+ ff_stack_T *stack = xmalloc(sizeof(ff_stack_T));
- new->ffs_prev = NULL;
- new->ffs_filearray = NULL;
- new->ffs_filearray_size = 0;
- new->ffs_filearray_cur = 0;
- new->ffs_stage = 0;
- new->ffs_level = level;
- new->ffs_star_star_empty = star_star_empty;
+ stack->ffs_prev = NULL;
+ stack->ffs_filearray = NULL;
+ stack->ffs_filearray_size = 0;
+ stack->ffs_filearray_cur = 0;
+ stack->ffs_stage = 0;
+ stack->ffs_level = level;
+ stack->ffs_star_star_empty = star_star_empty;
// the following saves NULL pointer checks in vim_findfile
if (fix_part == NULL) {
fix_part = "";
}
- new->ffs_fix_path = xstrdup(fix_part);
+ stack->ffs_fix_path = xstrdup(fix_part);
if (wc_part == NULL) {
wc_part = "";
}
- new->ffs_wc_path = xstrdup(wc_part);
+ stack->ffs_wc_path = xstrdup(wc_part);
- return new;
+ return stack;
}
/// Push a dir on the directory stack.
@@ -1341,7 +1341,7 @@ char *find_file_in_path_option(char *ptr, size_t len, int options, int first, ch
char *buf = NULL;
int rel_to_curdir;
- if (rel_fname != NULL && path_with_url((const char *)rel_fname)) {
+ if (rel_fname != NULL && path_with_url(rel_fname)) {
// Do not attempt to search "relative" to a URL. #6009
rel_fname = NULL;
}