提交 b8c5956e 编写于 作者: L limingkang

编码规范修改

Signed-off-by: Nlimingkang <limingkang1@huawei.com>
Change-Id: Ide4e14478d36f349c1c7d0a0cf6c4e3acae529c7
上级 b1cb825f
......@@ -55,18 +55,16 @@ static void ClearLogo(int fd)
}
static void WriteLogoContent(int fd, const std::string &logoPath, uint32_t size)
{
{
if (size == 0 || size > MAX_LOGO_SIZE) {
BSH_LOGE("logo size is invalid!");
return;
}
FILE *rgbFile = fopen(logoPath.c_str(), "rb");
if (rgbFile == nullptr) {
std::cout << "cannot find pic file\n";
return;
}
if (size <= 0 || size > MAX_LOGO_SIZE) {
BSH_LOGE("logo size is invalid!");
return;
}
char *buffer = reinterpret_cast<char *>(malloc(size));
if (buffer == nullptr) {
(void)fclose(rgbFile);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册