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:
Lennart Poettering
2022-11-22 01:30:55 +01:00
committed by Luca Boccassi
parent 47b3e96647
commit 7d1e61cab6
10 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -903,7 +903,7 @@ int posix_fallocate_loop(int fd, uint64_t offset, uint64_t size) {
/* On EINTR try a couple of times more, but protect against busy looping
* (not more than 16 times per 10s) */
rl = (RateLimit) { 10 * USEC_PER_SEC, 16 };
rl = (const RateLimit) { 10 * USEC_PER_SEC, 16 };
while (ratelimit_below(&rl)) {
r = posix_fallocate(fd, offset, size);
if (r != EINTR)