1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-09 12:58:26 +03:00

logs-show: fix stored timestamp when advance_older is true

Currently, the parsed timestamp is only used when advance_older is
false. Hence, this does not change any behavior. But, let's fix it anyway.
This commit is contained in:
Yu Watanabe 2024-04-26 11:30:34 +09:00
parent a467515519
commit afcd9c60fe

View File

@ -1841,7 +1841,7 @@ static int discover_next_boot(
goto try_again;
}
r = sd_journal_get_realtime_usec(j, &boot.first_usec);
r = sd_journal_get_realtime_usec(j, advance_older ? &boot.last_usec : &boot.first_usec);
if (r < 0)
return r;
@ -1863,7 +1863,7 @@ static int discover_next_boot(
goto try_again;
}
r = sd_journal_get_realtime_usec(j, &boot.last_usec);
r = sd_journal_get_realtime_usec(j, advance_older ? &boot.first_usec : &boot.last_usec);
if (r < 0)
return r;