]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/sleep/sleep.c
tree-wide: use -EBADF for fd initialization
[thirdparty/systemd.git] / src / sleep / sleep.c
index 9b69a2a10d1fcd315c87d7bb083b2d07ec670d12..20d3a9470444cd0f39c59b560dd562986aa22731 100644 (file)
@@ -273,7 +273,7 @@ static int custom_timer_suspend(const SleepConfig *sleep_config) {
         assert(sleep_config);
 
         while (battery_is_low() == 0) {
-                _cleanup_close_ int tfd = -1;
+                _cleanup_close_ int tfd = -EBADF;
                 struct itimerspec ts = {};
                 usec_t suspend_interval = sleep_config->hibernate_delay_sec, before_timestamp = 0, after_timestamp = 0, total_suspend_interval;
                 bool woken_by_timer;