diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-09 14:23:02 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-09 14:59:51 +0200 |
commit | 1f6b411372076426c0faf0bb350437fb4d82931f (patch) | |
tree | 32a52b3e2bb04731cc857b738e989531a4144516 /src/test | |
parent | 94c156cd452424ea59931920df2454d9da7cb774 (diff) |
tree-wide: update empty-if coccinelle script to cover empty-while and more
Let's also clean up single-line while and for blocks.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-ratelimit.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/test/test-ratelimit.c b/src/test/test-ratelimit.c index b7f6dfe246..462b55cdb3 100644 --- a/src/test/test-ratelimit.c +++ b/src/test/test-ratelimit.c @@ -27,19 +27,16 @@ static void test_ratelimit_test(void) { int i; RATELIMIT_DEFINE(ratelimit, 1 * USEC_PER_SEC, 10); - for (i = 0; i < 10; i++) { + for (i = 0; i < 10; i++) assert_se(ratelimit_test(&ratelimit)); - } assert_se(!ratelimit_test(&ratelimit)); sleep(1); - for (i = 0; i < 10; i++) { + for (i = 0; i < 10; i++) assert_se(ratelimit_test(&ratelimit)); - } RATELIMIT_INIT(ratelimit, 0, 10); - for (i = 0; i < 10000; i++) { + for (i = 0; i < 10000; i++) assert_se(ratelimit_test(&ratelimit)); - } } int main(int argc, char *argv[]) { |