summaryrefslogtreecommitdiff
path: root/src/oom
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-11-30 18:42:32 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-11-30 18:42:47 +0100
commit5f1d6ebd2a10799bdc17649857b721e9faf15d25 (patch)
tree7b75fb99c9c09cafa1b2cccbf42b984e23ad3bd0 /src/oom
parent528da64a0c734bd45e953b5c57d82e2a727435ef (diff)
downloadsystemd-5f1d6ebd2a10799bdc17649857b721e9faf15d25.tar.gz
oomd: use type suffix instead of casting
The end result is the same.
Diffstat (limited to 'src/oom')
-rw-r--r--src/oom/oomd-manager.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/oom/oomd-manager.c b/src/oom/oomd-manager.c
index b0d365e46b..9f4f083ab9 100644
--- a/src/oom/oomd-manager.c
+++ b/src/oom/oomd-manager.c
@@ -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) {
int permyriad = UINT32_SCALE_TO_PERMYRIAD(message.limit);
- r = store_loadavg_fixed_point(
- (unsigned long) permyriad / 100,
- (unsigned long) permyriad % 100,
- &limit);
+ r = store_loadavg_fixed_point(permyriad / 100LU, permyriad % 100LU, &limit);
if (r < 0)
continue;
}