mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
journal: small simplification
This commit is contained in:
parent
8d96289711
commit
846e541830
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user