mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-06 13:17:44 +03:00
oomd: use type suffix instead of casting
The end result is the same.
This commit is contained in:
parent
528da64a0c
commit
5f1d6ebd2a
@ -108,10 +108,7 @@ static int process_managed_oom_message(Manager *m, uid_t uid, JsonVariant *param
|
|||||||
if (streq(message.property, "ManagedOOMMemoryPressure") && message.limit > 0) {
|
if (streq(message.property, "ManagedOOMMemoryPressure") && message.limit > 0) {
|
||||||
int permyriad = UINT32_SCALE_TO_PERMYRIAD(message.limit);
|
int permyriad = UINT32_SCALE_TO_PERMYRIAD(message.limit);
|
||||||
|
|
||||||
r = store_loadavg_fixed_point(
|
r = store_loadavg_fixed_point(permyriad / 100LU, permyriad % 100LU, &limit);
|
||||||
(unsigned long) permyriad / 100,
|
|
||||||
(unsigned long) permyriad % 100,
|
|
||||||
&limit);
|
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user