代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/rpm 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From f34030816d84dfbf52f259404b32b81e53c21fbb Mon Sep 17 00:00:00 2001
From: Jes Sorensen <[email protected]>
Date: Fri, 3 Apr 2020 14:09:18 -0400
Subject: [PATCH] rpmfiArchiveRead() use signed return value to handle -1 on
error
size_t is unsigned, so returning -1 is not going to have the expected
behavior. Fix it to return ssize_t.
Signed-off-by: Jes Sorensen <[email protected]>
---
lib/rpmarchive.h | 4 ++--
lib/rpmfi.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/rpmarchive.h b/lib/rpmarchive.h
index c864e5b56..2484b4d71 100644
--- a/lib/rpmarchive.h
+++ b/lib/rpmarchive.h
@@ -122,9 +122,9 @@ int rpmfiArchiveWriteFile(rpmfi fi, FD_t fd);
* @param fi file info
* @param buf pointer to buffer
* @param size number of bytes to read
- * @return bytes actually read
+ * @return bytes actually read, -1 on error
*/
-size_t rpmfiArchiveRead(rpmfi fi, void * buf, size_t size);
+ssize_t rpmfiArchiveRead(rpmfi fi, void * buf, size_t size);
/** \ingroup payload
* Has current file content stored in the archive
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index c314a8b29..af428468c 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -2261,7 +2261,7 @@ int rpmfiArchiveHasContent(rpmfi fi)
return res;
}
-size_t rpmfiArchiveRead(rpmfi fi, void * buf, size_t size)
+ssize_t rpmfiArchiveRead(rpmfi fi, void * buf, size_t size)
{
if (fi == NULL || fi->archive == NULL)
return -1;
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。