加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0039-Initialize-variable-for-ppc-environment-1285601.patch 955 Bytes
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import grubby-8.40-38.el8.src.rpm
From d124974021199ddee0d1af1b2c7866f533c2f23a Mon Sep 17 00:00:00 2001
From: Robert Marshall <rmarshall@redhat.com>
Date: Mon, 27 Feb 2017 15:59:53 -0500
Subject: [PATCH 39/55] Initialize variable for ppc environment (#1285601)
Building on PPC does not default the value of an uninitialized integer
to zero which caused test failures.
Related: rhbz#1285601
---
grubby.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/grubby.c b/grubby.c
index 9edb26d0ded..9ccad2735dd 100644
--- a/grubby.c
+++ b/grubby.c
@@ -2566,6 +2566,8 @@ void setDefaultImage(struct grubConfig *config, int isAddingBootEntry,
/* check validity of existing default or first-entry-found
selection */
if (defaultKernelPath) {
+ /* we must initialize this */
+ firstKernelEntryIndex = 0;
/* user requested first-entry-found */
if (!findEntryByPath(config, defaultKernelPath,
prefix, &firstKernelEntryIndex)) {
--
2.17.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化