chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2dd1ca3
)
sd-journal: consistently use ternary operator for all direction checks
author
Christian Hesse
<mail@eworm.de>
Mon, 13 Oct 2014 20:12:33 +0000
(22:12 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 20 Oct 2014 20:02:49 +0000
(22:02 +0200)
src/journal/sd-journal.c
patch
|
blob
|
history
diff --git
a/src/journal/sd-journal.c
b/src/journal/sd-journal.c
index 479444c8dff94b8a4c22234a120d347cb5f3842f..daa04ac4fac7184f0863ef8730b07f4a614b1f75 100644
(file)
--- 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;