summaryrefslogtreecommitdiff
path: root/src/basic/journal-importer.c
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2017-09-29 00:37:23 +0200
committerAndreas Rammhold <andreas@rammhold.de>2017-10-02 13:09:54 +0200
commit3742095b27f8df4b195d530b52d15bc5fea70bf1 (patch)
tree3fc7c3503845b733f1d58366436c0bb672d3613a /src/basic/journal-importer.c
parent01a65d4180446661732d90d23a24ab692d279295 (diff)
downloadsystemd-3742095b27f8df4b195d530b52d15bc5fea70bf1.tar.gz
tree-wide: use IN_SET where possible
In addition to the changes from #6933 this handles cases that could be matched with the included cocci file.
Diffstat (limited to 'src/basic/journal-importer.c')
-rw-r--r--src/basic/journal-importer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/basic/journal-importer.c b/src/basic/journal-importer.c
index 38ac8deaf3..e750101165 100644
--- a/src/basic/journal-importer.c
+++ b/src/basic/journal-importer.c
@@ -154,9 +154,7 @@ static int get_line(JournalImporter *imp, char **line, size_t *size) {
static int fill_fixed_size(JournalImporter *imp, void **data, size_t size) {
assert(imp);
- assert(imp->state == IMPORTER_STATE_DATA_START ||
- imp->state == IMPORTER_STATE_DATA ||
- imp->state == IMPORTER_STATE_DATA_FINISH);
+ assert(IN_SET(imp->state, IMPORTER_STATE_DATA_START, IMPORTER_STATE_DATA, IMPORTER_STATE_DATA_FINISH));
assert(size <= DATA_SIZE_MAX);
assert(imp->offset <= imp->filled);
assert(imp->filled <= imp->size);