X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fratelimit.h;h=a44ef70db4f7bbfd4a8d0aa57c3b7d2968531af9;hp=e7dffb8bfa2d001d1643bcc8f8e79d6b7b1c1f34;hb=253ee27a0c7a410d27d490bb79ea97caed6a2b68;hpb=e99e38bbdcca3fe5956823bdb3d38544ccf93221 diff --git a/src/ratelimit.h b/src/ratelimit.h index e7dffb8bf..a44ef70db 100644 --- a/src/ratelimit.h +++ b/src/ratelimit.h @@ -1,4 +1,4 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ #ifndef fooratelimithfoo #define fooratelimithfoo @@ -28,15 +28,14 @@ typedef struct RateLimit { usec_t interval; usec_t begin; unsigned burst; - unsigned n_printed, n_missed; + unsigned num; } RateLimit; #define RATELIMIT_DEFINE(_name, _interval, _burst) \ RateLimit _name = { \ .interval = (_interval), \ .burst = (_burst), \ - .n_printed = 0, \ - .n_missed = 0, \ + .num = 0, \ .begin = 0 \ } @@ -45,8 +44,7 @@ typedef struct RateLimit { RateLimit *_r = &(v); \ _r->interval = (_interval); \ _r->burst = (_burst); \ - _r->n_printed = 0; \ - _r->n_missed = 0; \ + _r->num = 0; \ _r->begin = 0; \ } while (false);