From: Junio C Hamano Date: Tue, 19 Nov 2019 05:59:40 GMT Subject: Re: [PATCH v2 2/6] pathspec: add new function to parse file Message-ID: In-Reply-To: <96697ba0724caee556f21ada3959c4190d80c0b9.1573055478.git.gitgitgadget@gmail.com> "Alexandr Miloslavskiy via GitGitGadget" writes: > +void parse_pathspec_file(struct pathspec *pathspec, unsigned magic_mask, > + unsigned flags, const char *prefix, > + const char *file, int nul_term_line) > +{ > + struct argv_array parsed_file = ARGV_ARRAY_INIT; > + strbuf_getline_fn getline_fn = nul_term_line ? strbuf_getline_nul : > + strbuf_getline; > + struct strbuf buf = STRBUF_INIT; > + struct strbuf unquoted = STRBUF_INIT; > + FILE *in = NULL; Useless initialization to NULL can be dropped here. > + if (!strcmp(file, "-")) > + in = stdin; > + else > + in = xfopen(file, "r");