summaryrefslogtreecommitdiff
path: root/src/basic/ratelimit.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-05-11 11:16:52 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-05-13 22:08:30 +0200
commit7994ac1d851b39ee87181fbdbfe413f83f65260a (patch)
tree2ff5d4c638a5e42d624afff22b81ead090e76237 /src/basic/ratelimit.h
parent22dd8d350c635fb2ccd4641d19cf43f73cae4f6d (diff)
downloadsystemd-7994ac1d851b39ee87181fbdbfe413f83f65260a.tar.gz
Rename ratelimit_test to ratelimit_below
When I see "test", I have to think three times what the return value means. With "below" this is immediately clear. ratelimit_below(&limit) sounds almost like English and is imho immediately obvious. (I also considered ratelimit_ok, but this strongly implies that being under the limit is somehow better. Most of the times this is true, but then we use the ratelimit to detect triple-c-a-d, and "ok" doesn't fit so well there.) C.f. a1bcaa07.
Diffstat (limited to 'src/basic/ratelimit.h')
-rw-r--r--src/basic/ratelimit.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/ratelimit.h b/src/basic/ratelimit.h
index 6abab8f290..5a9aeb6486 100644
--- a/src/basic/ratelimit.h
+++ b/src/basic/ratelimit.h
@@ -43,4 +43,4 @@ typedef struct RateLimit {
_r->begin = 0; \
} while (false)
-bool ratelimit_test(RateLimit *r);
+bool ratelimit_below(RateLimit *r);