mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
journal-file: const and _pure_'ify journal_file_writable()
Follow-up for 1543c2385c
This commit is contained in:
@@ -4694,8 +4694,9 @@ bool journal_file_rotate_suggested(JournalFile *f, usec_t max_file_usec, int log
|
||||
return false;
|
||||
}
|
||||
|
||||
bool journal_file_writable(JournalFile *f) {
|
||||
bool journal_file_writable(const JournalFile *f) {
|
||||
assert(f);
|
||||
|
||||
return (f->open_flags & O_ACCMODE_STRICT) != O_RDONLY;
|
||||
}
|
||||
|
||||
|
||||
@@ -378,4 +378,4 @@ static inline uint32_t COMPRESSION_TO_HEADER_INCOMPATIBLE_FLAG(Compression c) {
|
||||
}
|
||||
}
|
||||
|
||||
bool journal_file_writable(JournalFile *f);
|
||||
bool journal_file_writable(const JournalFile *f) _pure_;
|
||||
|
||||
Reference in New Issue
Block a user