提交 4174654b 编写于 作者: Y yinjiaming

fix:修复使用无符号数接收sprintf_s的结果的问题

sprintf_s的返回值是有符号数,应使用有符号数来接收返回值
Signed-off-by: Nyinjiaming <yinjiaming@huawei.com>
Change-Id: Icb1248e0a75a77c1258f64dfa25eef0a7f5dd14e
上级 f3a7a9c6
......@@ -38,7 +38,7 @@ STATIC UINT32 g_currentUtsContainerNum;
STATIC UINT32 InitUtsContainer(struct utsname *name)
{
UINT32 ret = sprintf_s(name->sysname, sizeof(name->sysname), "%s", KERNEL_NAME);
INT32 ret = sprintf_s(name->sysname, sizeof(name->sysname), "%s", KERNEL_NAME);
if (ret < 0) {
return LOS_NOK;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册