summaryrefslogtreecommitdiffstats
path: root/src/core/swap.c
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-03-23 10:37:36 +0100
committerMike Yuan <me@yhndnzj.com>2024-03-23 18:08:40 +0100
commitdc4c5871631737c2f8b0ea4eed1909753dd47c0a (patch)
tree23145d41e174be8a3764962a0a5b36df4168a16c /src/core/swap.c
parentcore/swap: another try on memory mgmt (diff)
downloadsystemd-dc4c5871631737c2f8b0ea4eed1909753dd47c0a.tar.xz
systemd-dc4c5871631737c2f8b0ea4eed1909753dd47c0a.zip
core: introduce UNIT_IS_LOAD_ERROR helper
Diffstat (limited to 'src/core/swap.c')
-rw-r--r--src/core/swap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/swap.c b/src/core/swap.c
index 655f932f95..9e200086f3 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -422,7 +422,7 @@ static int swap_setup_unit(
/* The unit is definitely around now, mark it as loaded if it was previously referenced but
* could not be loaded. After all we can load it now, from the data in /proc/swaps. */
- if (IN_SET(u->load_state, UNIT_NOT_FOUND, UNIT_BAD_SETTING, UNIT_ERROR)) {
+ if (UNIT_IS_LOAD_ERROR(u->load_state)) {
u->load_state = UNIT_LOADED;
u->load_error = 0;
}