aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2015-01-23 14:31:03 +0100
committerEliseo Martínez <eliseomarmol@gmail.com>2015-01-27 01:33:33 +0100
commit883e3a7a73ec246b3534bae9340b6c4e89c4c467 (patch)
treeafa939e71ecba6736b620da34b0def6a2492360b
parent73c6bd8a4223b0a3888fe70b62847ce1e22a1783 (diff)
downloadrneovim-883e3a7a73ec246b3534bae9340b6c4e89c4c467.tar.gz
rneovim-883e3a7a73ec246b3534bae9340b6c4e89c4c467.tar.bz2
rneovim-883e3a7a73ec246b3534bae9340b6c4e89c4c467.zip
Remove nonnullret deadcode: xcalloc.
-rw-r--r--src/nvim/edit.c14
-rw-r--r--src/nvim/path.c8
-rw-r--r--src/nvim/search.c2
3 files changed, 9 insertions, 15 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 4a00a54e79..fa4e4b2835 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -2432,14 +2432,12 @@ void ins_compl_show_pum(void)
}
}
- if (compl_match_array != NULL) {
- /* Compute the screen column of the start of the completed text.
- * Use the cursor to get all wrapping and other settings right. */
- col = curwin->w_cursor.col;
- curwin->w_cursor.col = compl_col;
- pum_display(compl_match_array, compl_match_arraysize, cur);
- curwin->w_cursor.col = col;
- }
+ /* Compute the screen column of the start of the completed text.
+ * Use the cursor to get all wrapping and other settings right. */
+ col = curwin->w_cursor.col;
+ curwin->w_cursor.col = compl_col;
+ pum_display(compl_match_array, compl_match_arraysize, cur);
+ curwin->w_cursor.col = col;
}
#define DICT_FIRST (1) /* use just first element in "dict" */
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 0a19dabc01..e5f78440c2 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -881,11 +881,9 @@ static void uniquefy_paths(garray_T *gap, char_u *pattern)
}
free(curdir);
- if (in_curdir != NULL) {
- for (int i = 0; i < gap->ga_len; i++)
- free(in_curdir[i]);
- free(in_curdir);
- }
+ for (int i = 0; i < gap->ga_len; i++)
+ free(in_curdir[i]);
+ free(in_curdir);
ga_clear_strings(&path_ga);
vim_regfree(regmatch.regprog);
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 0721cb8fac..055d2db445 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -4025,8 +4025,6 @@ find_pattern_in_path (
def_regmatch.rm_ic = FALSE; /* don't ignore case in define pat. */
}
files = xcalloc(max_path_depth, sizeof(SearchedFile));
- if (files == NULL)
- goto fpip_end;
old_files = max_path_depth;
depth = depth_displayed = -1;