From 1ce928c75f466e73880d77b7533aacf072ce3a6d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 22 Sep 2021 15:58:55 +0300 Subject: [PATCH] lib: test-cpu-limit - Remove dead code No longer needed after 6d902507c24fca4f64e3e9bf7d79ae5a48281cd8 --- src/lib/test-cpu-limit.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/lib/test-cpu-limit.c b/src/lib/test-cpu-limit.c index aefb92ab7d..c4c1090ecc 100644 --- a/src/lib/test-cpu-limit.c +++ b/src/lib/test-cpu-limit.c @@ -76,7 +76,7 @@ test_cpu_limit_simple(enum cpu_limit_type type, const char *type_str) static void test_cpu_limit_nested(enum cpu_limit_type type, const char *type_str) { struct cpu_limit *climit1, *climit2; - struct timeval usage1, usage2, cpu; + struct timeval usage1, cpu; unsigned int n; int diff_msecs; @@ -88,16 +88,11 @@ static void test_cpu_limit_nested(enum cpu_limit_type type, const char *type_str while (!cpu_limit_exceeded(climit1) && !test_has_failed()) { climit2 = cpu_limit_init(1, type); - usage2 = get_cpu_time(type); while (!cpu_limit_exceeded(climit2) && !test_has_failed()) test_cpu_loop_once(); cpu_limit_deinit(&climit2); - cpu = get_cpu_time(type); - /* we may have looped only for a short time in case climit1 - was triggered during this loop. */ - diff_msecs = timeval_diff_msecs(&cpu, &usage2); } cpu_limit_deinit(&climit1); @@ -122,16 +117,11 @@ static void test_cpu_limit_nested(enum cpu_limit_type type, const char *type_str continue; } climit2 = cpu_limit_init(1, type); - usage2 = get_cpu_time(type); while (!cpu_limit_exceeded(climit2) && !test_has_failed()) test_cpu_loop_once(); cpu_limit_deinit(&climit2); - cpu = get_cpu_time(type); - /* we may have looped only for a short time in case climit1 - was triggered during this loop. */ - diff_msecs = timeval_diff_msecs(&cpu, &usage2); } cpu_limit_deinit(&climit1); -- 2.47.3