]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-event: fix delays assert brain-o (#17790)
authorVito Caputo <vcaputo@pengaru.com>
Tue, 1 Dec 2020 08:26:54 +0000 (00:26 -0800)
committerGitHub <noreply@github.com>
Tue, 1 Dec 2020 08:26:54 +0000 (09:26 +0100)
s/sizeof/ELEMENTSOF/

Bug introduced in 34b87517749caa4142b19eb3c63bdf349fafbc49.

src/libsystemd/sd-event/sd-event.c

index 7a3f89ed37e40de5bc994275739c724c2dcf3e61..789a8c7df4f690a6f7e7f4eb863ef42d8219fcc2 100644 (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) {