From: Lennart Poettering Date: Fri, 14 Jul 2017 17:01:25 +0000 (+0200) Subject: journald: add comment explaining journal rate limit return codes X-Git-Tag: v235~281^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ec6fe7c86ab767e9fe6d9d5338e4716f9688f360;p=thirdparty%2Fsystemd.git journald: add comment explaining journal rate limit return codes This is not obvious, hence let's add a comment. --- diff --git a/src/journal/journald-rate-limit.c b/src/journal/journald-rate-limit.c index f48639cf58c..a3404222e0c 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;