Make tables for DEFINE_STRING_TABLE_LOOKUP consistent
Bring some arrays that are used for DEFINE_STRING_TABLE_LOOKUP() in the same order than the enums they reference. Also, pass the corresponding _MAX value to the array initalizer where appropriate.
This commit is contained in:
+1
-1
@@ -1150,9 +1150,9 @@ static const char* const job_mode_table[_JOB_MODE_MAX] = {
|
||||
[JOB_REPLACE] = "replace",
|
||||
[JOB_REPLACE_IRREVERSIBLY] = "replace-irreversibly",
|
||||
[JOB_ISOLATE] = "isolate",
|
||||
[JOB_FLUSH] = "flush",
|
||||
[JOB_IGNORE_DEPENDENCIES] = "ignore-dependencies",
|
||||
[JOB_IGNORE_REQUIREMENTS] = "ignore-requirements",
|
||||
[JOB_FLUSH] = "flush",
|
||||
};
|
||||
|
||||
DEFINE_STRING_TABLE_LOOKUP(job_mode, JobMode);
|
||||
|
||||
+2
-2
@@ -761,16 +761,16 @@ DEFINE_STRING_TABLE_LOOKUP(path_state, PathState);
|
||||
static const char* const path_type_table[_PATH_TYPE_MAX] = {
|
||||
[PATH_EXISTS] = "PathExists",
|
||||
[PATH_EXISTS_GLOB] = "PathExistsGlob",
|
||||
[PATH_DIRECTORY_NOT_EMPTY] = "DirectoryNotEmpty",
|
||||
[PATH_CHANGED] = "PathChanged",
|
||||
[PATH_MODIFIED] = "PathModified",
|
||||
[PATH_DIRECTORY_NOT_EMPTY] = "DirectoryNotEmpty"
|
||||
};
|
||||
|
||||
DEFINE_STRING_TABLE_LOOKUP(path_type, PathType);
|
||||
|
||||
static const char* const path_result_table[_PATH_RESULT_MAX] = {
|
||||
[PATH_SUCCESS] = "success",
|
||||
[PATH_FAILURE_RESOURCES] = "resources"
|
||||
[PATH_FAILURE_RESOURCES] = "resources",
|
||||
};
|
||||
|
||||
DEFINE_STRING_TABLE_LOOKUP(path_result, PathResult);
|
||||
|
||||
+1
-1
@@ -3278,9 +3278,9 @@ static const char* const unit_dependency_table[_UNIT_DEPENDENCY_MAX] = {
|
||||
[UNIT_TRIGGERED_BY] = "TriggeredBy",
|
||||
[UNIT_PROPAGATES_RELOAD_TO] = "PropagatesReloadTo",
|
||||
[UNIT_RELOAD_PROPAGATED_FROM] = "ReloadPropagatedFrom",
|
||||
[UNIT_JOINS_NAMESPACE_OF] = "JoinsNamespaceOf",
|
||||
[UNIT_REFERENCES] = "References",
|
||||
[UNIT_REFERENCED_BY] = "ReferencedBy",
|
||||
[UNIT_JOINS_NAMESPACE_OF] = "JoinsNamespaceOf",
|
||||
};
|
||||
|
||||
DEFINE_STRING_TABLE_LOOKUP(unit_dependency, UnitDependency);
|
||||
|
||||
Reference in New Issue
Block a user