tree-wide: make constant ratelimit compound actually const
The compiler should recognize that these are constant expressions, but let's better make this explicit, so that the linker can safely share the initializations all over the place.
This commit is contained in:
committed by
Luca Boccassi
parent
47b3e96647
commit
7d1e61cab6
@@ -4163,7 +4163,7 @@ int journal_file_get_cutoff_monotonic_usec(JournalFile *f, sd_id128_t boot_id, u
|
||||
|
||||
/* Ideally this would be a function parameter but initializers for static fields have to be compile
|
||||
* time constants so we hardcode the interval instead. */
|
||||
#define LOG_RATELIMIT ((RateLimit) { .interval = 60 * USEC_PER_SEC, .burst = 3 })
|
||||
#define LOG_RATELIMIT ((const RateLimit) { .interval = 60 * USEC_PER_SEC, .burst = 3 })
|
||||
|
||||
bool journal_file_rotate_suggested(JournalFile *f, usec_t max_file_usec, int log_level) {
|
||||
assert(f);
|
||||
|
||||
Reference in New Issue
Block a user