diff --git a/src/tsdb/src/tsdbFile.c b/src/tsdb/src/tsdbFile.c index bd5c20bd7a28d0f3a1f857d3561566a3b2b49f93..b07f6eed7f1c0595b809ed75b732b09ece316230 100644 --- a/src/tsdb/src/tsdbFile.c +++ b/src/tsdb/src/tsdbFile.c @@ -288,7 +288,11 @@ int tsdbCopyBlockDataInFile(SFile *pOutFile, SFile *pInFile, SCompInfo *pCompInf static int compFGroupKey(const void *key, const void *fgroup) { int fid = *(int *)key; SFileGroup *pFGroup = (SFileGroup *)fgroup; - return (fid - pFGroup->fileId); + if (fid == pFGroup->fileId) { + return 0; + } else { + return fid > pFGroup->fileId? 1:-1; + } } static int compFGroup(const void *arg1, const void *arg2) {