未验证 提交 3b5366ef 编写于 作者: M Mupceet 提交者: Gitee

Signed-off-by: Mupceet <laiguizhong@huawei.com>

上级 9e495f0a
......@@ -87,8 +87,8 @@ static void WriteLogoContent(int fd, const std::string &logoPath, uint32_t size)
free(buffer);
return;
}
uint32_t ret = write(fd, buffer, size);
if (ret != size) {
ssize_t ret = write(fd, buffer, size);
if (ret == -1 || ret != size) {
(void)fclose(rgbFile);
free(buffer);
return;
......
......@@ -182,7 +182,7 @@ static int RemoveDeviceNode(const char *deviceNode, char **symLinks)
}
if (symLinks != NULL) {
for (int i = 0; symLinks[i] != NULL; i++) {
char realPath[DEVICE_FILE_SIZE] = {};
char realPath[DEVICE_FILE_SIZE] = {0};
const char *linkName = symLinks[i];
ssize_t ret = readlink(linkName, realPath, DEVICE_FILE_SIZE - 1);
if (ret < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册