archive-*.c: use designated initializers for "struct archiver"
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Feb 24, 2022 at 10:33 UTC
4fbedd4dc0845d5aa5b56cefc7d0ac23602c210d
2 files changed
+6
-6
archive-tar.c
+3
-3
@@ -461,9 +461,9 @@ static int write_tar_filter_archive(const struct archiver *ar,
461
}
462
463
static struct archiver tar_archiver = {
464
- "tar",
465
- write_tar_archive,
466
- ARCHIVER_REMOTE
464
+ .name = "tar",
465
+ .write_archive = write_tar_archive,
466
+ .flags = ARCHIVER_REMOTE,
467
};
468
469
void init_tar_archiver(void)
archive-zip.c
+3
-3
@@ -637,9 +637,9 @@ static int write_zip_archive(const struct archiver *ar,
637
}
638
639
static struct archiver zip_archiver = {
640
- "zip",
641
- write_zip_archive,
642
- ARCHIVER_WANT_COMPRESSION_LEVELS|ARCHIVER_REMOTE
640
+ .name = "zip",
641
+ .write_archive = write_zip_archive,
642
+ .flags = ARCHIVER_WANT_COMPRESSION_LEVELS|ARCHIVER_REMOTE,
643
};
644
645
void init_zip_archiver(void)