Merge branch 'develop' into feature/2.0tsdb
This commit is contained in:
commit
8acc4b0bcc
|
@ -46,8 +46,16 @@ static int32_t tscToInteger(SSQLToken *pToken, int64_t *value, char **endPtr) {
|
|||
return TK_ILLEGAL;
|
||||
}
|
||||
|
||||
|
||||
int32_t radix = 10;
|
||||
if (pToken->type == TK_HEX) {
|
||||
radix = 16;
|
||||
} else if (pToken->type == TK_BIN) {
|
||||
radix = 2;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
*value = strtoll(pToken->z, endPtr, 0);
|
||||
*value = strtoll(pToken->z, endPtr, radix);
|
||||
if (**endPtr == 'e' || **endPtr == 'E' || **endPtr == '.') {
|
||||
errno = 0;
|
||||
double v = round(strtod(pToken->z, endPtr));
|
||||
|
|
|
@ -194,13 +194,12 @@ void *tSkipListDestroy(SSkipList *pSkipList) {
|
|||
pthread_rwlock_wrlock(pSkipList->lock);
|
||||
}
|
||||
|
||||
SSkipListNode *pNode = SL_GET_FORWARD_POINTER(pSkipList->pHead, 0);
|
||||
if (pSkipList->keyInfo.freeNode) {
|
||||
SSkipListNode *pNode = SL_GET_FORWARD_POINTER(pSkipList->pHead, 0);
|
||||
|
||||
while (pNode != pSkipList->pTail) {
|
||||
SSkipListNode *pTemp = pNode;
|
||||
pNode = SL_GET_FORWARD_POINTER(pNode, 0);
|
||||
|
||||
if (pSkipList->keyInfo.freeNode) {
|
||||
while (pNode != pSkipList->pTail) {
|
||||
SSkipListNode *pTemp = pNode;
|
||||
pNode = SL_GET_FORWARD_POINTER(pNode, 0);
|
||||
tfree(pTemp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue