From 7994ac1d851b39ee87181fbdbfe413f83f65260a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 11 May 2018 11:16:52 +0200 Subject: 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. --- src/import/export-raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/import/export-raw.c') diff --git a/src/import/export-raw.c b/src/import/export-raw.c index 2ae146fd32..c9070acf20 100644 --- a/src/import/export-raw.c +++ b/src/import/export-raw.c @@ -126,7 +126,7 @@ static void raw_export_report_progress(RawExport *e) { if (percent == e->last_percent) return; - if (!ratelimit_test(&e->progress_rate_limit)) + if (!ratelimit_below(&e->progress_rate_limit)) return; sd_notifyf(false, "X_IMPORT_PROGRESS=%u", percent); -- cgit v1.2.1