From 16cec133c63d1836e5f3ceeb452b8f65d9d210d5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 8 Feb 2022 11:27:48 +0100 Subject: [PATCH] sd-boot: return 0 (not 1) from ticks_read() in fallback implementation 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/boot/efi/ticks.c b/src/boot/efi/ticks.c index 3e7ff688233..4ed43d09705 100644 --- a/src/boot/efi/ticks.c +++ b/src/boot/efi/ticks.c @@ -25,8 +25,7 @@ static UINT64 ticks_read(void) { } #else static UINT64 ticks_read(void) { - UINT64 val = 1; - return val; + return 0; } #endif -- 2.47.3