]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: fix rtc atexit registration
authorSami Kerola <kerolasa@iki.fi>
Tue, 26 Jul 2016 13:34:30 +0000 (14:34 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sat, 4 Feb 2017 23:39:38 +0000 (23:39 +0000)
Commit 27f9db17bd57b85947445c03e2cd9dda36ca377f missed a minus sign from
comparison.

Reviewed-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/hwclock-rtc.c

index fa5e07b118bc930bd6e43e1c2e9bf520bf0994e7..92f04435b218d105d2527acf43f84e1fae919197 100644 (file)
@@ -138,7 +138,7 @@ static int open_rtc(const struct hwclock_control *ctl)
                if (rtc_dev_fd < 0)
                        rtc_dev_name = *fls;    /* default for error messages */
        }
-       if (rtc_dev_fd != 1)
+       if (rtc_dev_fd != -1)
                atexit(close_rtc);
        return rtc_dev_fd;
 }