1 Star 0 Fork 46

wangfengtu/src-iSulad

forked from src-openEuler/iSulad 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0007-create-fix-wrong-ret-code.patch 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
gaohuatao 提交于 2020-11-12 19:32 . update from openeuler
From ba32dabc6d6304410ed6c731c2f276c1f50a9b06 Mon Sep 17 00:00:00 2001
From: lifeng68 <[email protected]>
Date: Fri, 23 Oct 2020 10:05:07 +0800
Subject: [PATCH 07/28] create: fix wrong ret code
Signed-off-by: lifeng68 <[email protected]>
---
src/cmd/isula/base/create.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/cmd/isula/base/create.c b/src/cmd/isula/base/create.c
index 12903ce..96ca483 100644
--- a/src/cmd/isula/base/create.c
+++ b/src/cmd/isula/base/create.c
@@ -1249,24 +1249,24 @@ int client_create(struct client_arguments *args)
request->image = util_strdup_s(args->image_name);
container_spec = request_pack_custom_conf(args);
- if (container_spec == 0) {
- ret = -1;
+ if (container_spec == NULL) {
+ ret = EINVALIDARGS;
goto out;
}
if (generate_container_config(container_spec, &request->container_spec_json) != 0) {
- ret = -1;
+ ret = EINVALIDARGS;
goto out;
}
host_spec = request_pack_host_config(args);
- if (host_spec == 0) {
- ret = -1;
+ if (host_spec == NULL) {
+ ret = EINVALIDARGS;
goto out;
}
if (generate_hostconfig(host_spec, &request->host_spec_json) != 0) {
- ret = -1;
+ ret = EINVALIDARGS;
goto out;
}
--
2.20.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangfengtu/src-iSulad.git
[email protected]:wangfengtu/src-iSulad.git
wangfengtu
src-iSulad
src-iSulad
master

搜索帮助