6 Star 0 Fork 7

src-openEuler/booth

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Refactor-Add-three-argument-versions-of-FOREACH_-NOD.patch 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
bizhiyuan 提交于 2024-10-17 20:40 +08:00 . Apply find_* function refactorings
From e3dccd88d90f0b822ed815cb9a43e84c961a92f9 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Thu, 11 Jul 2024 10:33:02 -0400
Subject: [PATCH 2/5] Refactor: Add three argument versions of
FOREACH_{NODE,TICKET}.
These take an additional argument that is the config object. Nothing
uses these at the moment - I'm going to move callers from the old
renamed versions to these over a bunch of commits.
---
src/ticket.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/ticket.h b/src/ticket.h
index af4b195..dc6869e 100644
--- a/src/ticket.h
+++ b/src/ticket.h
@@ -35,6 +35,17 @@ extern int TIME_RES;
#define DEFAULT_RETRIES 10
+#define FOREACH_TICKET(b_, i_, t_) \
+ for (i_ = 0; \
+ (t_ = (b_)->ticket + i_, i_ < (b_)->ticket_count); \
+ i_++)
+
+#define FOREACH_NODE(b_, i_, n_) \
+ for (i_ = 0; \
+ (n_ = (b_)->site + i_, i_ < (b_)->site_count); \
+ i_++)
+
+
#define _FOREACH_TICKET(i_, t_) \
for (i_ = 0; \
(t_ = booth_conf->ticket + i_, i_ < booth_conf->ticket_count); \
--
2.25.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/booth.git
git@gitee.com:src-openeuler/booth.git
src-openeuler
booth
booth
master

搜索帮助