]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/backlight/backlight.c
reboot-util: cache the result of shall_restore_state
[thirdparty/systemd.git] / src / backlight / backlight.c
index a3842088799af6deebddf351af6d4c693a84d0ca..24459628faf694316c11885bd049cebca52b81aa 100644 (file)
@@ -528,7 +528,7 @@ static int run(int argc, char *argv[]) {
                 _cleanup_free_ char *value = NULL;
                 bool clamp;
 
-                if (shall_restore_state() == 0)
+                if (!shall_restore_state())
                         return 0;
 
                 if (validate_device(device) == 0)