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 <j...@keeping.me.uk>
---
 ui-snapshot.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ui-snapshot.c b/ui-snapshot.c
index 8f82119..5136c49 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -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);
-- 
1.8.5.226.g0d60d77

_______________________________________________
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to