]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-event: fix error handling
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Feb 2023 22:31:01 +0000 (07:31 +0900)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Feb 2023 08:27:48 +0000 (09:27 +0100)
Follow-up for 6d2326e036ceed30f9ccdb0266713c10a44dcf6c.

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

index 3db9122fc2e89b6ba356cf16b16ec99be8417f12..46292da2a1f3e5c7ecd7b83fcb0a015494eb33d0 100644 (file)
@@ -1269,7 +1269,7 @@ static void initialize_perturb(sd_event *e) {
         if (_likely_(e->perturb != USEC_INFINITY))
                 return;
 
-        if (sd_id128_get_boot(&id) >= 0 || sd_id128_get_machine(&id) > 0)
+        if (sd_id128_get_boot(&id) >= 0 || sd_id128_get_machine(&id) >= 0)
                 e->perturb = (id.qwords[0] ^ id.qwords[1]) % USEC_PER_MINUTE;
         else
                 e->perturb = 0; /* This is a super early process without /proc and /etc ?? */