Thread (27 messages) flat view 27 messages, 4 authors, 2018-10-02

Re: [PATCH 2/2] fsck: use oidset for skiplist

From: René Scharfe <hidden>
Date: 2018-08-25 18:50:51

Am 11.08.2018 um 22:48 schrieb Ramsay Jones:
On 11/08/18 16:47, René Scharfe wrote:
quoted
@@ -34,12 +36,12 @@ struct fsck_options {
     fsck_error error_func;
     unsigned strict:1;
     int *msg_type;
-    struct oid_array *skiplist;
+    struct oidset skiplist;
     struct decoration *object_names;
 };
 
-#define FSCK_OPTIONS_DEFAULT { NULL, fsck_error_function, 0, NULL }
-#define FSCK_OPTIONS_STRICT { NULL, fsck_error_function, 1, NULL }
+#define FSCK_OPTIONS_DEFAULT { NULL, fsck_error_function, 0, NULL, OIDSET_INIT }
+#define FSCK_OPTIONS_STRICT { NULL, fsck_error_function, 1, NULL, OIDSET_INIT }
Note that a NULL initialiser, for the object_names field, is missing
(not introduced by this patch). Since you have bumped into the 80th
column, you may not want to add that NULL to the end of these macros
(it is not _necessary_ after all). However, ... :-D
Exactly my thoughts -- except the "However" part. :)

I even thought about reordering the struct to move the NULL-initialized
elements to the end, allowing us to drop them from the initializer, but
felt that this would be a bit too much..

René
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help