From 846e541830bce41fcea2f197ae1c8b34e2308cb6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 29 May 2018 17:01:53 +0200 Subject: [PATCH] journal: small simplification --- src/journal/journal-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 606ca604acf..c9b6466bab7 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -212,7 +212,7 @@ int journal_file_set_offline(JournalFile *f, bool wait) { if (!f->writable) return -EPERM; - if (!(f->fd >= 0 && f->header)) + if (f->fd < 0 || !f->header) return -EINVAL; /* An offlining journal is implicitly online and may modify f->header->state, @@ -269,7 +269,7 @@ static int journal_file_set_online(JournalFile *f) { if (!f->writable) return -EPERM; - if (!(f->fd >= 0 && f->header)) + if (f->fd < 0 || !f->header) return -EINVAL; while (wait) { -- 2.47.3