]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
oomd: use type suffix instead of casting
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 30 Nov 2021 17:42:32 +0000 (18:42 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 30 Nov 2021 17:42:47 +0000 (18:42 +0100)
The end result is the same.

src/oom/oomd-manager.c

index b0d365e46b25220bb18c02d97bf0d2583f67bf85..9f4f083ab9ac9c0ef0821bf60e9e9668056b56a0 100644 (file)
@@ -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;
                 }