chiark / gitweb /
build-sys: initial support ALTLinux
[elogind.git] / src / swap.c
index 6ab99d5712f09d74058de5abdd286567dfbb1787..9a253beea2c026ade0a5d77e3f67339716af9657 100644 (file)
@@ -36,6 +36,7 @@
 #include "dbus-swap.h"
 #include "special.h"
 #include "bus-errors.h"
+#include "exit-status.h"
 
 static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
         [SWAP_DEAD] = UNIT_INACTIVE,
@@ -1089,7 +1090,7 @@ int swap_fd_event(Manager *m, int events) {
         assert(m);
         assert(events & EPOLLPRI);
 
-        if ((r == swap_load_proc_swaps(m, true)) < 0) {
+        if ((r = swap_load_proc_swaps(m, true)) < 0) {
                 log_error("Failed to reread /proc/swaps: %s", strerror(-r));
 
                 /* Reset flags, just in case, for late calls */