mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 16:38:42 +00:00
ui-snapshot: set unused cgit_filter fields to zero
By switching the assignment of fields in the cgit_filter structure to use designated initializers, the compiler will initialize all other fields to their default value. This will be needed when we add the extra_args field in the next patch. Signed-off-by: John Keeping <john@keeping.me.uk>
This commit is contained in:
parent
fd31aa6930
commit
da218fcd9e
@ -58,10 +58,10 @@ static int write_compressed_tar_archive(const char *hex,
|
|||||||
char *filter_argv[])
|
char *filter_argv[])
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
struct cgit_filter f;
|
struct cgit_filter f = {
|
||||||
|
.cmd = filter_argv[0],
|
||||||
f.cmd = filter_argv[0];
|
.argv = filter_argv,
|
||||||
f.argv = filter_argv;
|
};
|
||||||
cgit_open_filter(&f);
|
cgit_open_filter(&f);
|
||||||
rv = write_tar_archive(hex, prefix);
|
rv = write_tar_archive(hex, prefix);
|
||||||
cgit_close_filter(&f);
|
cgit_close_filter(&f);
|
||||||
|
Loading…
Reference in New Issue
Block a user