]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-boot: return 0 (not 1) from ticks_read() in fallback implementation
authorLennart Poettering <lennart@poettering.net>
Tue, 8 Feb 2022 10:27:48 +0000 (11:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 8 Feb 2022 12:46:23 +0000 (13:46 +0100)
The single consumer of ticks_read() (i.e. time_usec()) checks for == 0
to detect the "not supported/invalid" case, hence actually return the
right value for that.

src/boot/efi/ticks.c

index 3e7ff68823361cda6b818efd2e47446a858eaa23..4ed43d09705a3a99fab445dcaa1a78dd704a33f8 100644 (file)
@@ -25,8 +25,7 @@ static UINT64 ticks_read(void) {
 }
 #else
 static UINT64 ticks_read(void) {
-        UINT64 val = 1;
-        return val;
+        return 0;
 }
 #endif