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>
这个提交包含在:
John Keeping 2014-01-12 17:13:49 +00:00 提交者 Jason A. Donenfeld
父节点 fd31aa6930
当前提交 da218fcd9e
共有 1 个文件被更改,包括 4 次插入4 次删除

查看文件

@ -58,10 +58,10 @@ static int write_compressed_tar_archive(const char *hex,
char *filter_argv[])
{
int rv;
struct cgit_filter f;
f.cmd = filter_argv[0];
f.argv = filter_argv;
struct cgit_filter f = {
.cmd = filter_argv[0],
.argv = filter_argv,
};
cgit_open_filter(&f);
rv = write_tar_archive(hex, prefix);
cgit_close_filter(&f);