chiark / gitweb /
sd-journal: consistently use ternary operator for all direction checks
authorChristian Hesse <mail@eworm.de>
Mon, 13 Oct 2014 20:12:33 +0000 (22:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 20 Oct 2014 20:02:49 +0000 (22:02 +0200)
src/journal/sd-journal.c

index 479444c..daa04ac 100644 (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;