1 Star 0 Fork 32

compile_success/gazelle_3

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-fix-compile-error-unuse-result.patch 743 Bytes
一键复制 编辑 原始数据 按行查看 历史
吴昌盛 提交于 2022-03-03 20:02 . support mysql with two mode
From 9155ca505cc2b3f3aa70ff6c0b4401be517b194f Mon Sep 17 00:00:00 2001
From: wuchangsheng <wuchangsheng2@huawei.com>
Date: Fri, 4 Mar 2022 14:19:14 +0800
Subject: [PATCH] fix compile error
---
src/ltran/ltran_dfx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index c923de0..159fbb9 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -111,7 +111,10 @@ static pid_t ltran_process_exist(void)
char line[LINE];
FILE *cmd = popen("pidof ltran", "r");
- (void)fgets(line, LINE, cmd);
+ if(fgets(line, LINE, cmd) == NULL) {
+ return 0;
+ }
+
pid_t pid = strtoul(line, NULL, BASE_DEC_SCALE);
(void)pclose(cmd);
--
2.30.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/compile_success/gazelle_3.git
git@gitee.com:compile_success/gazelle_3.git
compile_success
gazelle_3
gazelle_3
master

搜索帮助