sd-event: fix delays assert brain-o (#17790)

s/sizeof/ELEMENTSOF/

Bug introduced in 34b8751774.
This commit is contained in:
Vito Caputo
2020-12-01 09:26:54 +01:00
committed by GitHub
parent e11ec61d65
commit cb9d621ebb
+1 -1
View File
@@ -3725,7 +3725,7 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
this_run = now(CLOCK_MONOTONIC);
l = u64log2(this_run - e->last_run);
assert(l < sizeof(e->delays));
assert(l < ELEMENTSOF(e->delays));
e->delays[l]++;
if (this_run - e->last_log >= 5*USEC_PER_SEC) {