journald: add comment explaining journal rate limit return codes
authorLennart Poettering <lennart@poettering.net>
Fri, 14 Jul 2017 17:01:25 +0000 (19:01 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 31 Jul 2017 16:20:28 +0000 (18:20 +0200)
This is not obvious, hence let's add a comment.

src/journal/journald-rate-limit.c

index f48639c..a340422 100644 (file)
@@ -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;