mirror of
https://github.com/systemd/systemd.git
synced 2025-01-25 10:04:04 +03:00
journald: make use of CLAMP() in cache_space_refresh()
This commit is contained in:
parent
4bb37be07b
commit
6d7afa3b58
@ -157,7 +157,7 @@ static int cache_space_refresh(Server *s, JournalStorage *storage) {
|
||||
|
||||
avail = LESS_BY(vfs_avail, metrics->keep_free);
|
||||
|
||||
space->limit = MIN(MAX(vfs_used + avail, metrics->min_use), metrics->max_use);
|
||||
space->limit = CLAMP(vfs_used + avail, metrics->min_use, metrics->max_use);
|
||||
space->available = LESS_BY(space->limit, vfs_used);
|
||||
space->timestamp = ts;
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user