Thread (159 messages) flat view 159 messages, 9 authors, 2021-03-28
STALE2005d

Revision v6 of 4 in this series.

Revisions (4)
  1. v1 [diff vs current]
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v6 current

[PATCH v6 02/19] fsck.h: use designed initializers for FSCK_OPTIONS_{DEFAULT,STRICT}

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-03-28 13:17:06
Subsystem: the rest · Maintainer: Linus Torvalds

Refactor the definitions of FSCK_OPTIONS_{DEFAULT,STRICT} to use
designated initializers. This allows us to omit those fields that
aren't initialized to zero or NULL.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 fsck.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/fsck.h b/fsck.h
index f70d11c5594..73e8b9f3e4e 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:
-- 
2.31.1.445.g087790d4945
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help