diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-05-29 17:01:53 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-05-31 20:42:04 +0200 |
commit | 846e541830bce41fcea2f197ae1c8b34e2308cb6 (patch) | |
tree | eadcc14840b9b9333bc346223bd089c63f8350c3 | |
parent | 8d96289711c51c5099be2241af8b213e89d9dbd1 (diff) | |
download | systemd-846e541830bce41fcea2f197ae1c8b34e2308cb6.tar.gz |
journal: small simplification
-rw-r--r-- | src/journal/journal-file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 606ca604ac..c9b6466bab 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) { |