summaryrefslogtreecommitdiffstats
path: root/src/findfile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-25 20:21:28 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-25 20:21:28 +0200
commit51e14387f120392b74b84408cafec33942337a05 (patch)
tree43d2b2077c404671de3f7fdfc5bc90930aa53d09 /src/findfile.c
parent682725c1415f50681877df60257115a966e2a3d4 (diff)
patch 8.1.1393: unnecessary type castsv8.1.1393
Problem: Unnecessary type casts. Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
Diffstat (limited to 'src/findfile.c')
-rw-r--r--src/findfile.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/findfile.c b/src/findfile.c
index a6d164ad29..2fee353628 100644
--- a/src/findfile.c
+++ b/src/findfile.c
@@ -588,9 +588,9 @@ vim_findfile_init(
if (search_ctx->ffsc_wc_path != NULL)
{
wc_path = vim_strsave(search_ctx->ffsc_wc_path);
- temp = alloc((int)(STRLEN(search_ctx->ffsc_wc_path)
+ temp = alloc(STRLEN(search_ctx->ffsc_wc_path)
+ STRLEN(search_ctx->ffsc_fix_path + len)
- + 1));
+ + 1);
if (temp == NULL || wc_path == NULL)
{
vim_free(buf);
@@ -722,7 +722,7 @@ vim_findfile(void *search_ctx_arg)
* filepath is used as buffer for various actions and as the storage to
* return a found filename.
*/
- if ((file_path = alloc((int)MAXPATHL)) == NULL)
+ if ((file_path = alloc(MAXPATHL)) == NULL)
return NULL;
#ifdef FEAT_PATH_EXTRA
@@ -1866,7 +1866,7 @@ find_file_in_path_option(
break;
}
- if ((buf = alloc((int)(MAXPATHL))) == NULL)
+ if ((buf = alloc(MAXPATHL)) == NULL)
break;
// copy next path
@@ -2274,7 +2274,7 @@ expand_path_option(char_u *curdir, garray_T *gap)
char_u *p;
int len;
- if ((buf = alloc((int)MAXPATHL)) == NULL)
+ if ((buf = alloc(MAXPATHL)) == NULL)
return;
while (*path_option != NUL)
@@ -2424,7 +2424,7 @@ uniquefy_paths(garray_T *gap, char_u *pattern)
if (regmatch.regprog == NULL)
return;
- if ((curdir = alloc((int)(MAXPATHL))) == NULL)
+ if ((curdir = alloc(MAXPATHL)) == NULL)
goto theend;
mch_dirname(curdir, MAXPATHL);
expand_path_option(curdir, &path_ga);
@@ -2532,7 +2532,7 @@ uniquefy_paths(garray_T *gap, char_u *pattern)
continue;
}
- rel_path = alloc((int)(STRLEN(short_name) + STRLEN(PATHSEPSTR) + 2));
+ rel_path = alloc(STRLEN(short_name) + STRLEN(PATHSEPSTR) + 2);
if (rel_path == NULL)
goto theend;
STRCPY(rel_path, ".");