Skip to content

Commit 30cf618

Browse files
avargitster
authored andcommitted
fsck.h: re-order and re-assign "enum fsck_msg_type"
Change the values in the "enum fsck_msg_type" from being manually assigned to using default C enum values. This means we end up with a FSCK_IGNORE=0, which was previously defined as "2". I'm confident that nothing relies on these values, we always compare them for equality. Let's not omit "0" so it won't be assumed that we're using these as a boolean somewhere. This also allows us to re-structure the fields to mark which are "private" v.s. "public". See the preceding commit for a rationale for not simply splitting these into two enums, namely that this is used for both the private and public fsck API. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1b32b59 commit 30cf618

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

fsck.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
#include "oidset.h"
55

66
enum fsck_msg_type {
7-
FSCK_INFO = -2,
8-
FSCK_FATAL = -1,
9-
FSCK_ERROR = 1,
7+
/* for internal use only */
8+
FSCK_IGNORE,
9+
FSCK_INFO,
10+
FSCK_FATAL,
11+
/* "public", fed to e.g. error_func callbacks */
12+
FSCK_ERROR,
1013
FSCK_WARN,
11-
FSCK_IGNORE
1214
};
1315

1416
struct fsck_options;

0 commit comments

Comments
 (0)