chiark / gitweb /
sd-journal: consistently use ternary operator for all direction checks
[elogind.git] / src / journal / sd-journal.c
index 479444c8dff94b8a4c22234a120d347cb5f3842f..daa04ac4fac7184f0863ef8730b07f4a614b1f75 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;