comparison src/findfile.c @ 27028:c9474ae175f4 v8.2.4043

patch 8.2.4043: using int for second argument of ga_init2() Commit: https://github.com/vim/vim/commit/04935fb17e5f0f66b82cf4546b9752d3d1fa650e Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 8 16:19:22 2022 +0000 patch 8.2.4043: using int for second argument of ga_init2() Problem: Using int for second argument of ga_init2(). Solution: Remove unnessary type cast (int) when using sizeof().
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Jan 2022 17:30:04 +0100
parents 85866e069c24
children ebe56a24acb6
comparison
equal deleted inserted replaced
27027:167e35b85720 27028:c9474ae175f4
2428 garray_T path_ga; 2428 garray_T path_ga;
2429 char_u **in_curdir = NULL; 2429 char_u **in_curdir = NULL;
2430 char_u *short_name; 2430 char_u *short_name;
2431 2431
2432 remove_duplicates(gap); 2432 remove_duplicates(gap);
2433 ga_init2(&path_ga, (int)sizeof(char_u *), 1); 2433 ga_init2(&path_ga, sizeof(char_u *), 1);
2434 2434
2435 /* 2435 /*
2436 * We need to prepend a '*' at the beginning of file_pattern so that the 2436 * We need to prepend a '*' at the beginning of file_pattern so that the
2437 * regex matches anywhere in the path. FIXME: is this valid for all 2437 * regex matches anywhere in the path. FIXME: is this valid for all
2438 * possible patterns? 2438 * possible patterns?
2609 2609
2610 if ((curdir = alloc(MAXPATHL)) == NULL) 2610 if ((curdir = alloc(MAXPATHL)) == NULL)
2611 return 0; 2611 return 0;
2612 mch_dirname(curdir, MAXPATHL); 2612 mch_dirname(curdir, MAXPATHL);
2613 2613
2614 ga_init2(&path_ga, (int)sizeof(char_u *), 1); 2614 ga_init2(&path_ga, sizeof(char_u *), 1);
2615 expand_path_option(curdir, &path_ga); 2615 expand_path_option(curdir, &path_ga);
2616 vim_free(curdir); 2616 vim_free(curdir);
2617 if (path_ga.ga_len == 0) 2617 if (path_ga.ga_len == 0)
2618 return 0; 2618 return 0;
2619 2619