summaryrefslogtreecommitdiffstats
path: root/src/oom
diff options
context:
space:
mode:
Diffstat (limited to 'src/oom')
-rw-r--r--src/oom/test-oomd-util.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/oom/test-oomd-util.c b/src/oom/test-oomd-util.c
index d76d91e26d..1aef6039e1 100644
--- a/src/oom/test-oomd-util.c
+++ b/src/oom/test-oomd-util.c
@@ -291,19 +291,19 @@ static void test_oomd_pressure_above(void) {
static void test_oomd_mem_and_swap_free_below(void) {
OomdSystemContext ctx = (OomdSystemContext) {
- .mem_total = 20971512 * 1024U,
- .mem_used = 3310136 * 1024U,
- .swap_total = 20971512 * 1024U,
- .swap_used = 20971440 * 1024U,
+ .mem_total = UINT64_C(20971512) * 1024U,
+ .mem_used = UINT64_C(3310136) * 1024U,
+ .swap_total = UINT64_C(20971512) * 1024U,
+ .swap_used = UINT64_C(20971440) * 1024U,
};
assert_se(oomd_mem_available_below(&ctx, 2000) == false);
assert_se(oomd_swap_free_below(&ctx, 2000) == true);
ctx = (OomdSystemContext) {
- .mem_total = 20971512 * 1024U,
- .mem_used = 20971440 * 1024U,
- .swap_total = 20971512 * 1024U,
- .swap_used = 3310136 * 1024U,
+ .mem_total = UINT64_C(20971512) * 1024U,
+ .mem_used = UINT64_C(20971440) * 1024U,
+ .swap_total = UINT64_C(20971512) * 1024U,
+ .swap_used = UINT64_C(3310136) * 1024U,
};
assert_se(oomd_mem_available_below(&ctx, 2000) == true);
assert_se(oomd_swap_free_below(&ctx, 2000) == false);