all repos — cgit @ da218fcd9eb554a8405ca72e84bcc0feb371194f

a hyperfast web frontend for git written in c

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 john@keeping.me.uk
Sun, 12 Jan 2014 17:13:49 +0000
commit

da218fcd9eb554a8405ca72e84bcc0feb371194f

parent

fd31aa693077d0eea1b14a7f44ffe29503e2ad59

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M ui-snapshot.cui-snapshot.c

@@ -58,10 +58,10 @@ const char *prefix,

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);