fix: 告警修复

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I0535818b4c5f39c9ca916d2ff76eaffda900c726
This commit is contained in:
arvinzzz
2022-03-22 18:21:04 +08:00
parent 7e4681fefb
commit 2d7bf3b7d8
8 changed files with 7 additions and 27 deletions

View File

@@ -54,7 +54,7 @@ STATIC INLINE VOID SetErrno(INT32 errcode)
STATIC INLINE VOID SetErr(INT32 errcode, const CHAR *errMessage)
{
SetErrno(errcode);
PRINTK(errMessage);
PRINTK("%s", errMessage);
}
#ifdef __cplusplus

View File

@@ -130,7 +130,7 @@ STATIC CHAR *OsLsGetFullpath(const CHAR *path, struct dirent *pdirent)
goto exit_with_nomem;
}
ret = snprintf_s(fullpath, pathLen, pathLen, "%s/%s", path, pdirent->d_name);
ret = snprintf_s(fullpath, pathLen, pathLen - 1, "%s/%s", path, pdirent->d_name);
if (ret < 0) {
free(fullpath);
return NULL;