journal-file: const and _pure_'ify journal_file_writable()

Follow-up for 1543c2385c
This commit is contained in:
Mike Yuan
2025-07-03 22:30:12 +02:00
parent 4df7d51cde
commit d75219711f
2 changed files with 3 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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_;