]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/unit: use IN_SET at one more place
authorMike Yuan <me@yhndnzj.com>
Sun, 14 Apr 2024 15:20:31 +0000 (23:20 +0800)
committerMike Yuan <me@yhndnzj.com>
Sun, 14 Apr 2024 15:22:12 +0000 (23:22 +0800)
src/core/unit.h

index 0cfd90b3d4c5a174a81379f92f7bae3cf617cd98..74520a33cb30fc465d94690d864e331a3d6f87be 100644 (file)
@@ -64,7 +64,7 @@ static inline bool UNIT_IS_INACTIVE_OR_FAILED(UnitActiveState t) {
 }
 
 static inline bool UNIT_IS_LOAD_COMPLETE(UnitLoadState t) {
-        return t >= 0 && t < _UNIT_LOAD_STATE_MAX && t != UNIT_STUB && t != UNIT_MERGED;
+        return t >= 0 && t < _UNIT_LOAD_STATE_MAX && !IN_SET(t, UNIT_STUB, UNIT_MERGED);
 }
 
 static inline bool UNIT_IS_LOAD_ERROR(UnitLoadState t) {