diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-02-09 17:17:47 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-02-10 14:46:59 +0100 |
commit | 2d93c20e5f600a9f1e4b617123577acf6ce5faa0 (patch) | |
tree | 9c1e17edb84c37920bb37d0fb8021c058c4ca2b3 /src/shared/condition.h | |
parent | 71c163c9fa737053bccf8f6d733b272dfacc966f (diff) | |
download | systemd-2d93c20e5f600a9f1e4b617123577acf6ce5faa0.tar.gz |
tree-wide: use -EINVAL for enum invalid values
As suggested in https://github.com/systemd/systemd/pull/11484#issuecomment-775288617.
This does not touch anything exposed in src/systemd. Changing the defines there
would be a compatibility break.
Note that tests are broken after this commit. They will be fixed in the next one.
Diffstat (limited to 'src/shared/condition.h')
-rw-r--r-- | src/shared/condition.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/condition.h b/src/shared/condition.h index 0d9754eb85..7853490290 100644 --- a/src/shared/condition.h +++ b/src/shared/condition.h @@ -40,7 +40,7 @@ typedef enum ConditionType { CONDITION_CONTROL_GROUP_CONTROLLER, _CONDITION_TYPE_MAX, - _CONDITION_TYPE_INVALID = -1 + _CONDITION_TYPE_INVALID = -EINVAL, } ConditionType; typedef enum ConditionResult { @@ -49,7 +49,7 @@ typedef enum ConditionResult { CONDITION_FAILED, CONDITION_ERROR, _CONDITION_RESULT_MAX, - _CONDITION_RESULT_INVALID = -1 + _CONDITION_RESULT_INVALID = -EINVAL, } ConditionResult; typedef struct Condition { |