diff options
author | John Keeping | 2014-01-12 17:13:49 +0000 |
---|---|---|
committer | Jason A. Donenfeld | 2014-01-12 20:16:33 +0100 |
commit | da218fcd9eb554a8405ca72e84bcc0feb371194f (patch) | |
tree | de33d5f00820c52da33f8d56042972b6e6c5b267 /ui-snapshot.c | |
parent | fd31aa693077d0eea1b14a7f44ffe29503e2ad59 (diff) | |
download | cgit-da218fcd9eb554a8405ca72e84bcc0feb371194f.tar.gz cgit-da218fcd9eb554a8405ca72e84bcc0feb371194f.tar.bz2 cgit-da218fcd9eb554a8405ca72e84bcc0feb371194f.zip |
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>
Diffstat (limited to 'ui-snapshot.c')
-rw-r--r-- | ui-snapshot.c | 8 |
1 files 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, | |||
58 | char *filter_argv[]) | 58 | char *filter_argv[]) |
59 | { | 59 | { |
60 | int rv; | 60 | int rv; |
61 | struct cgit_filter f; | 61 | struct cgit_filter f = { |
62 | 62 | .cmd = filter_argv[0], | |
63 | f.cmd = filter_argv[0]; | 63 | .argv = filter_argv, |
64 | f.argv = filter_argv; | 64 | }; |
65 | cgit_open_filter(&f); | 65 | cgit_open_filter(&f); |
66 | rv = write_tar_archive(hex, prefix); | 66 | rv = write_tar_archive(hex, prefix); |
67 | cgit_close_filter(&f); | 67 | cgit_close_filter(&f); |