Remove nonnullret deadcode: xcalloc.

This commit is contained in:
Eliseo Martínez 2015-01-23 14:31:03 +01:00
parent 73c6bd8a42
commit 883e3a7a73
3 changed files with 9 additions and 15 deletions

View File

@ -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" */

View File

@ -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);

View File

@ -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;