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
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user