提交 55f1d464 编写于 作者: Y yihaoDeng

fix invalid cmp

上级 3e944d22
......@@ -967,13 +967,8 @@ static rocksdb_iterator_t* streamStateIterCreate(SStreamState* pState, const cha
rocksdb_snapshot_t** snapshot, rocksdb_readoptions_t** readOpt);
int defaultKeyComp(void* state, const char* aBuf, size_t aLen, const char* bBuf, size_t bLen) {
int ret = 0;
// qError("alen: %d, blen:%d", (int)aLen, (int)bLen);
if (aLen < bLen) {
ret = memcmp(aBuf, bBuf, aLen);
} else {
ret = memcmp(aBuf, bBuf, bLen);
}
int len = aLen < bLen ? aLen : bLen;
int ret = memcmp(aBuf, bBuf, len);
if (ret == 0) {
if (aLen < bLen)
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册