From ec6fe7c86ab767e9fe6d9d5338e4716f9688f360 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 14 Jul 2017 19:01:25 +0200 Subject: [PATCH] journald: add comment explaining journal rate limit return codes This is not obvious, hence let's add a comment. --- src/journal/journald-rate-limit.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/journal/journald-rate-limit.c b/src/journal/journald-rate-limit.c index f48639cf58..a3404222e0 100644 --- a/src/journal/journald-rate-limit.c +++ b/src/journal/journald-rate-limit.c @@ -216,6 +216,13 @@ int journal_rate_limit_test(JournalRateLimit *r, const char *id, int priority, u assert(id); + /* Returns: + * + * 0 → the log message shall be suppressed, + * 1 + n → the log message shall be permitted, and n messages were dropped from the peer before + * < 0 → error + */ + if (!r) return 1; -- 2.25.1