From d41111d5f88dff0e6eb17ce29aca067ee99c6344 Mon Sep 17 00:00:00 2001 From: xsren <285808407@qq.com> Date: Thu, 12 Sep 2024 20:12:58 +0800 Subject: [PATCH] fix: build on win --- source/libs/index/inc/indexComm.h | 2 +- source/libs/index/src/indexCache.c | 4 ++-- source/libs/index/src/indexTfile.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/libs/index/inc/indexComm.h b/source/libs/index/inc/indexComm.h index 227a97e298..173443dfc5 100644 --- a/source/libs/index/inc/indexComm.h +++ b/source/libs/index/inc/indexComm.h @@ -30,7 +30,7 @@ char* idxPackJsonData(SIndexTerm* itm); char* idxPackJsonDataPrefix(SIndexTerm* itm, int32_t* skip); char* idxPackJsonDataPrefixNoType(SIndexTerm* itm, int32_t* skip); -typedef enum { MATCH, CONTINUE, BREAK, ERROR } TExeCond; +typedef enum { MATCH, CONTINUE, BREAK, FAILED } TExeCond; typedef TExeCond (*_cache_range_compare)(void* a, void* b, int8_t type); diff --git a/source/libs/index/src/indexCache.c b/source/libs/index/src/indexCache.c index 97d49ca6e0..828a3e2e9e 100644 --- a/source/libs/index/src/indexCache.c +++ b/source/libs/index/src/indexCache.c @@ -154,7 +154,7 @@ static int32_t cacheSearchCompareFunc(void* cache, SIndexTerm* term, SIdxTRslt* } CacheTerm* c = (CacheTerm*)SL_GET_NODE_DATA(node); TExeCond cond = cmpFn(c->colVal, pCt->colVal, pCt->colType); - if (cond == ERROR) { + if (cond == FAILED) { code = terrno; goto _return; } @@ -336,7 +336,7 @@ static int32_t cacheSearchCompareFunc_JSON(void* cache, SIndexTerm* term, SIdxTR memcpy(p, c->colVal, strlen(c->colVal)); cond = cmpFn(p + skip, term->colVal, dType); taosMemoryFree(p); - if (cond == ERROR) { + if (cond == FAILED) { code = terrno; goto _return; } diff --git a/source/libs/index/src/indexTfile.c b/source/libs/index/src/indexTfile.c index 2a47e3393c..eb00cc7990 100644 --- a/source/libs/index/src/indexTfile.c +++ b/source/libs/index/src/indexTfile.c @@ -368,7 +368,7 @@ static int32_t tfSearchCompareFunc(void* reader, SIndexTerm* tem, SIdxTRslt* tr, char* ch = (char*)fstSliceData(s, NULL); TExeCond cond = cmpFn(ch, p, tem->colType); - if (ERROR == cond) { + if (FAILED == cond) { swsResultDestroy(rt); code = terrno; goto _return; @@ -521,7 +521,7 @@ static int32_t tfSearchCompareFunc_JSON(void* reader, SIndexTerm* tem, SIdxTRslt memcpy(tBuf, ch, sz); cond = cmpFn(tBuf + skip, tem->colVal, IDX_TYPE_GET_TYPE(tem->colType)); taosMemoryFree(tBuf); - if (ERROR == cond) { + if (FAILED == cond) { swsResultDestroy(rt); code = terrno; goto _return;