use safe func
This commit is contained in:
parent
4d193bcf5d
commit
4d51e218dc
|
@ -3386,7 +3386,8 @@ int32_t streamStateGetFirst_rocksdb(SStreamState* pState, SWinKey* key) {
|
|||
return streamStateDel_rocksdb(pState, &tmp);
|
||||
}
|
||||
|
||||
int32_t streamStateFillGetGroupKVByCur_rocksdb(SStreamStateCur* pCur, SWinKey* pKey, const void** pVal, int32_t* pVLen) {
|
||||
int32_t streamStateFillGetGroupKVByCur_rocksdb(SStreamStateCur* pCur, SWinKey* pKey, const void** pVal,
|
||||
int32_t* pVLen) {
|
||||
if (!pCur) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -4377,7 +4378,8 @@ void streamStateParTagSeekKeyNext_rocksdb(SStreamState* pState, const int64_t gr
|
|||
}
|
||||
}
|
||||
|
||||
int32_t streamStateParTagGetKVByCur_rocksdb(SStreamStateCur* pCur, int64_t* pGroupId, const void** pVal, int32_t* pVLen) {
|
||||
int32_t streamStateParTagGetKVByCur_rocksdb(SStreamStateCur* pCur, int64_t* pGroupId, const void** pVal,
|
||||
int32_t* pVLen) {
|
||||
stDebug("streamStateFillGetKVByCur_rocksdb");
|
||||
if (!pCur) {
|
||||
return -1;
|
||||
|
@ -4714,7 +4716,7 @@ int32_t compareHashTableImpl(SHashObj* p1, SHashObj* p2, SArray* diff) {
|
|||
if (fname == NULL) {
|
||||
return terrno;
|
||||
}
|
||||
TAOS_UNUSED(strncpy(fname, name, len));
|
||||
tstrncpy(fname, name, strlen(name));
|
||||
if (taosArrayPush(diff, &fname) == NULL) {
|
||||
taosMemoryFree(fname);
|
||||
return terrno;
|
||||
|
@ -4876,7 +4878,7 @@ int32_t dbChkpGetDelta(SDbChkp* p, int64_t chkpId, SArray* list) {
|
|||
return terrno;
|
||||
}
|
||||
|
||||
TAOS_UNUSED(strncpy(fname, name, len));
|
||||
tstrncpy(fname, name, strlen(name));
|
||||
if (taosArrayPush(p->pAdd, &fname) == NULL) {
|
||||
taosMemoryFree(fname);
|
||||
TAOS_UNUSED(taosThreadRwlockUnlock(&p->rwLock));
|
||||
|
@ -5351,7 +5353,8 @@ SStreamStateCur* streamStateSeekKeyPrev_rocksdb(SStreamState* pState, const SWin
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int32_t streamStateGetGroupKVByCur_rocksdb(SStreamState* pState, SStreamStateCur* pCur, SWinKey* pKey, const void** pVal, int32_t* pVLen) {
|
||||
int32_t streamStateGetGroupKVByCur_rocksdb(SStreamState* pState, SStreamStateCur* pCur, SWinKey* pKey,
|
||||
const void** pVal, int32_t* pVLen) {
|
||||
if (!pCur) {
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue