Created attachment 77577 [details] [review] Fix typo. I think it's just a typo, check the attached patch. Sometimes, skipping backwards with a match that yields the empty set will not return 0, but will successfully skip the requested number of items. The next call to sd_journal_next will then correctly return 0. To reproduce, find two matches that are independently non-empty, but whose intersection is empty, and then use them with "journalctl -n10" or similar. For example: # journalctl PRIORITY=2 <some output> # journalctl _PID=1 <some other output> # journalctl PRIORITY=2 _PID=1 <empty> But # journalctl -n10 PRIORITY=2 _PID=1 <one entry> You might need to swap the match expressions: # journalctl -n10 _PID=1 PRIORITY=2 As mentioned, I think this is just a typo in next_for_match for the DIRECTION_UP case. The attached patch seems to fix all incorrect behavior that I could find.
Indeed! Applied! Thanks!
Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.