chiark / gitweb /
util: loop_write - accept 0-length message
[elogind.git] / src / shared / ratelimit.c
index 1054d52f979ee8e493c52875a40d68b37994cc8e..81fc9c19ff6c30eff6d1be1c5f9df48fc7a7e90d 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <assert.h>
 
 #include "ratelimit.h"
-#include "log.h"
 
 /* Modelled after Linux' lib/ratelimit.c by Dave Young
  * <hidave.darkstar@gmail.com>, which is licensed GPLv2. */
@@ -46,7 +44,7 @@ bool ratelimit_test(RateLimit *r) {
                 goto good;
         }
 
-        if (r->num <= r->burst)
+        if (r->num < r->burst)
                 goto good;
 
         return false;