sd-journal: consistently use ternary operator for all direction checks

This commit is contained in:
Christian Hesse
2014-10-20 22:02:49 +02:00
committed by Lennart Poettering
parent 2dd1ca3fd6
commit 1cdf717550
+2 -4
View File
@@ -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;