summaryrefslogtreecommitdiff
path: root/fsck.h
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-03-28 13:15:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-29 02:02:59 (GMT)
commitd385784f89b3350db16380441bc8a18ebe54179a (patch)
treef1c2963843c590de3dbc2dfd5a26bb01ea666f18 /fsck.h
parentfb79f5bff7f47f41cf3697ecc28bfaa888016ce0 (diff)
downloadgit-d385784f89b3350db16380441bc8a18ebe54179a.zip
git-d385784f89b3350db16380441bc8a18ebe54179a.tar.gz
git-d385784f89b3350db16380441bc8a18ebe54179a.tar.bz2
fsck.h: use designed initializers for FSCK_OPTIONS_{DEFAULT,STRICT}
Refactor the definitions of FSCK_OPTIONS_{DEFAULT,STRICT} to use designated initializers. This allows us to omit those fields that are initialized to 0 or NULL. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fsck.h')
-rw-r--r--fsck.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/fsck.h b/fsck.h
index f70d11c..73e8b9f 100644
--- a/fsck.h
+++ b/fsck.h
@@ -43,8 +43,14 @@ struct fsck_options {
kh_oid_map_t *object_names;
};
-#define FSCK_OPTIONS_DEFAULT { NULL, fsck_error_function, 0, NULL, OIDSET_INIT }
-#define FSCK_OPTIONS_STRICT { NULL, fsck_error_function, 1, NULL, OIDSET_INIT }
+#define FSCK_OPTIONS_DEFAULT { \
+ .skiplist = OIDSET_INIT, \
+ .error_func = fsck_error_function \
+}
+#define FSCK_OPTIONS_STRICT { \
+ .strict = 1, \
+ .error_func = fsck_error_function, \
+}
/* descend in all linked child objects
* the return value is: