comparison src/search.c @ 16768:695d9ef00b03 v8.1.1386

patch 8.1.1386: unessesary type casts for lalloc() commit https://github.com/vim/vim/commit/18a4ba29aeccb9841d5bfdd2eaaffdfae2f15ced Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 24 19:39:03 2019 +0200 patch 8.1.1386: unessesary type casts for lalloc() Problem: Unessesary type casts for lalloc(). Solution: Remove type casts. Change lalloc(size, TRUE) to alloc(size).
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 May 2019 19:45:05 +0200
parents 97ad98d95214
children 7d4c814a8554
comparison
equal deleted inserted replaced
16767:3959544fc067 16768:695d9ef00b03
5135 ? p_def : curbuf->b_p_def, p_magic ? RE_MAGIC : 0); 5135 ? p_def : curbuf->b_p_def, p_magic ? RE_MAGIC : 0);
5136 if (def_regmatch.regprog == NULL) 5136 if (def_regmatch.regprog == NULL)
5137 goto fpip_end; 5137 goto fpip_end;
5138 def_regmatch.rm_ic = FALSE; /* don't ignore case in define pat. */ 5138 def_regmatch.rm_ic = FALSE; /* don't ignore case in define pat. */
5139 } 5139 }
5140 files = (SearchedFile *)lalloc_clear((long_u) 5140 files = (SearchedFile *)lalloc_clear(
5141 (max_path_depth * sizeof(SearchedFile)), TRUE); 5141 max_path_depth * sizeof(SearchedFile), TRUE);
5142 if (files == NULL) 5142 if (files == NULL)
5143 goto fpip_end; 5143 goto fpip_end;
5144 old_files = max_path_depth; 5144 old_files = max_path_depth;
5145 depth = depth_displayed = -1; 5145 depth = depth_displayed = -1;
5146 5146
5296 if (new_fname != NULL) 5296 if (new_fname != NULL)
5297 { 5297 {
5298 /* Push the new file onto the file stack */ 5298 /* Push the new file onto the file stack */
5299 if (depth + 1 == old_files) 5299 if (depth + 1 == old_files)
5300 { 5300 {
5301 bigger = (SearchedFile *)lalloc((long_u)( 5301 bigger = (SearchedFile *)alloc(
5302 max_path_depth * 2 * sizeof(SearchedFile)), TRUE); 5302 max_path_depth * 2 * sizeof(SearchedFile));
5303 if (bigger != NULL) 5303 if (bigger != NULL)
5304 { 5304 {
5305 for (i = 0; i <= depth; i++) 5305 for (i = 0; i <= depth; i++)
5306 bigger[i] = files[i]; 5306 bigger[i] = files[i];
5307 for (i = depth + 1; i < old_files + max_path_depth; i++) 5307 for (i = depth + 1; i < old_files + max_path_depth; i++)