代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/rpm 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 911a4f253c7213a8570028a7dc2a20b045de8e9e Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Mon, 26 Jun 2023 16:28:07 +0200
Subject: [PATCH] Actually return an error in parseScript if parsing fails
The return value is stored in the "res" variable which is set to the return
value of parseLines early in the function. Past that point, any "goto exit;"
caused the function to return success. This was introduced by 52ce88851abb
("Port parseScript() to use parseLines(), no functional changes"). To fix it,
reintroduce the nextPart variable.
---
build/parseScript.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/build/parseScript.c b/build/parseScript.c
index f8b693ac6..6f3dc2fe8 100644
--- a/build/parseScript.c
+++ b/build/parseScript.c
@@ -95,7 +95,7 @@ int parseScript(rpmSpec spec, int parsePart)
int index;
char * reqargs = NULL;
- int res = PART_ERROR; /* assume failure */
+ int nextPart, res = PART_ERROR; /* assume failure */
int rc, argc;
int arg;
const char **argv = NULL;
@@ -367,7 +367,7 @@ int parseScript(rpmSpec spec, int parsePart)
goto exit;
}
- if ((res = parseLines(spec, STRIP_NOTHING, NULL, &sb)) == PART_ERROR)
+ if ((nextPart = parseLines(spec, STRIP_NOTHING, NULL, &sb)) == PART_ERROR)
goto exit;
if (sb) {
@@ -479,6 +479,8 @@ int parseScript(rpmSpec spec, int parsePart)
}
}
+ res = nextPart;
+
exit:
free(reqargs);
freeStringBuf(sb);
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。