path: root/fsck.h
diff options
authorÆvar Arnfjörð Bjarmason <>2021-03-28 13:15:35 (GMT)
committerJunio C Hamano <>2021-03-29 02:03:10 (GMT)
commita1aad71601a7a2052058d735ef86624b3cc774cf (patch)
tree8c607238fac75a6cc96456448d55d440e6a9d2e4 /fsck.h
parentd385784f89b3350db16380441bc8a18ebe54179a (diff)
fsck.h: use "enum object_type" instead of "int"
Change the fsck_walk_func to use an "enum object_type" instead of an "int" type. The types are compatible, and ever since this was added in 355885d5315 (add generic, type aware object chain walker, 2008-02-25) we've used entries from object_type (OBJ_BLOB etc.). So this doesn't really change anything as far as the generated code is concerned, it just gives the compiler more information and makes this easier to read. Signed-off-by: Ævar Arnfjörð Bjarmason <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'fsck.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/fsck.h b/fsck.h
index 73e8b9f..f20f125 100644
--- a/fsck.h
+++ b/fsck.h
@@ -23,7 +23,8 @@ int is_valid_msg_type(const char *msg_id, const char *msg_type);
* <0 error signaled and abort
* >0 error signaled and do not abort
-typedef int (*fsck_walk_func)(struct object *obj, int type, void *data, struct fsck_options *options);
+typedef int (*fsck_walk_func)(struct object *obj, enum object_type object_type,
+ void *data, struct fsck_options *options);
/* callback for fsck_object, type is FSCK_ERROR or FSCK_WARN */
typedef int (*fsck_error)(struct fsck_options *o,