summaryrefslogtreecommitdiff
path: root/src/import/export-raw.c
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/import/export-raw.c
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/import/export-raw.c')
-rw-r--r--src/import/export-raw.c2
1 files changed, 1 insertions, 1 deletions
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);