fix(query): fix syntax errors.
This commit is contained in:
parent
4112f1c1f0
commit
464f108e48
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue