未验证 提交 be9a32fc 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #17998 from taosdata/fix/liao_cov

fix(query): fix syntax errors.
......@@ -131,7 +131,8 @@ static int32_t udfSpawnUdfd(SUdfdData *pData) {
char udfdPathLdLib[1024] = {0};
size_t udfdLdLibPathLen = strlen(tsUdfdLdLibPath);
strncpy(udfdPathLdLib, tsUdfdLdLibPath, udfdLdLibPathLen);
strncpy(udfdPathLdLib, tsUdfdLdLibPath, tListLen(udfdPathLdLib));
udfdPathLdLib[udfdLdLibPathLen] = ':';
strncpy(udfdPathLdLib + udfdLdLibPathLen + 1, pathTaosdLdLib, sizeof(udfdPathLdLib) - udfdLdLibPathLen - 1);
if (udfdLdLibPathLen + taosdLdLibPathLen < 1024) {
......
......@@ -317,14 +317,14 @@ static void taosGetLogFileName(char *fn) {
for (int32_t i = 0; i < tsLogObj.fileNum; i++) {
char fileName[LOG_FILE_NAME_LEN];
sprintf(fileName, "%s%d.0", fn, i);
snprintf(fileName, LOG_FILE_NAME_LEN, "%s%d.0", fn, i);
bool file1open = taosCheckFileIsOpen(fileName);
sprintf(fileName, "%s%d.1", fn, i);
snprintf(fileName, LOG_FILE_NAME_LEN, "%s%d.1", fn, i);
bool file2open = taosCheckFileIsOpen(fileName);
if (!file1open && !file2open) {
sprintf(tsLogObj.logName, "%s%d", fn, i);
snprintf(tsLogObj.logName, LOG_FILE_NAME_LEN, "%s%d", fn, i);
return;
}
}
......@@ -598,7 +598,7 @@ static int32_t taosPushLogBuffer(SLogBuff *pLogBuf, const char *msg, int32_t msg
remainSize = (start > end) ? (start - end - 1) : (start + LOG_BUF_SIZE(pLogBuf) - end - 1);
if (lostLine > 0) {
sprintf(tmpBuf, "...Lost %" PRId64 " lines here...\n", lostLine);
snprintf(tmpBuf, tListLen(tmpBuf), "...Lost %" PRId64 " lines here...\n", lostLine);
tmpBufLen = (int32_t)strlen(tmpBuf);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册