提交 48872f6c 编写于 作者: H hzcheng

move header

上级 84e0df6b
......@@ -168,6 +168,7 @@ void * taosbsearch(const void *key, const void *base, size_t nmemb, size_t size,
if (flags == TD_EQ) {
return bsearch(key, base, nmemb, size, compar);
} else if (flags == TD_GE) {
if (nmemb <= 0) return NULL;
if ((*compar)(key, elePtrAt(base, size, 0)) <= 0) return elePtrAt(base, size, 0);
if ((*compar)(key, elePtrAt(base, size, nmemb - 1)) > 0) return NULL;
......@@ -193,6 +194,7 @@ void * taosbsearch(const void *key, const void *base, size_t nmemb, size_t size,
}
}
} else if (flags == TD_LE) {
if (nmemb <= 0) return NULL;
if ((*compar)(key, elePtrAt(base, size, nmemb - 1)) >= 0) return elePtrAt(base, size, nmemb - 1);
if ((*compar)(key, elePtrAt(base, size, 0)) < 0) return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册