加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-sd-event-fix-error-handling.patch 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
hongjinghao 提交于 2023-06-19 10:57 . sync patches from systemd community
From 056fbe84ef67168adcaf41baa37de1b712f6fb74 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Thu, 23 Feb 2023 07:31:01 +0900
Subject: [PATCH] sd-event: fix error handling
Follow-up for 6d2326e036ceed30f9ccdb0266713c10a44dcf6c.
(cherry picked from commit 1912f790fee9e0182acd77b77496f500094a140d)
(cherry picked from commit a719c2ec2f410f8b979cec04dcdac9af470ee52b)
(cherry picked from commit dd6561ff3e12314d41954b7ea8e3627101931a18)
(cherry picked from commit 8be4af42044969bc268b32ffe9570cee733fecf6)
---
src/libsystemd/sd-event/sd-event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 37565b17be..df4d9037ac 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -1137,7 +1137,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 ?? */
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化