From: Christian Hesse Date: Mon, 13 Oct 2014 20:12:33 +0000 (+0200) Subject: sd-journal: consistently use ternary operator for all direction checks X-Git-Tag: v217~185 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=1cdf717550971ea4e3c637dc964822062645eaed sd-journal: consistently use ternary operator for all direction checks --- diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 479444c8d..daa04ac4f 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -849,10 +849,8 @@ static int next_beyond_location(sd_journal *j, JournalFile *f, direction_t direc int k; k = compare_with_location(f, c, &j->current_location); - if (direction == DIRECTION_DOWN) - found = k > 0; - else - found = k < 0; + + found = direction == DIRECTION_DOWN ? k > 0 : k < 0; } else found = true;