提交 87b63a9f 编写于 作者: S Shengliang Guan

minor changes

上级 4cbfc4f8
......@@ -20,8 +20,6 @@
extern "C" {
#endif
// clang-format off
#define TAOS_DEF_ERROR_CODE(mod, code) ((int32_t)((0x80000000 | ((mod)<<16) | (code))))
#define TAOS_SYSTEM_ERROR(code) (0x80ff0000 | (code))
......
......@@ -16,6 +16,8 @@
#ifndef _TD_UTIL_VERSION_H_
#define _TD_UTIL_VERSION_H_
#include "os.h"
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -158,12 +158,12 @@ void taosqsort(void *src, int64_t numOfElem, int64_t size, const void *param, __
tfree(buf);
}
void *taosbsearch(const void *key, const void *base, int64_t nmemb, int64_t size, __compar_fn_t compar, int flags) {
void *taosbsearch(const void *key, const void *base, int64_t nmemb, int64_t size, __compar_fn_t compar, int32_t flags) {
// TODO: need to check the correctness of this function
int l = 0;
int r = (int)nmemb;
int idx = 0;
int comparison;
int32_t l = 0;
int32_t r = (int32_t)nmemb;
int32_t idx = 0;
int32_t comparison;
if (flags == TD_EQ) {
return bsearch(key, base, nmemb, size, compar);
......
......@@ -14,9 +14,8 @@
*/
#define _DEFAULT_SOURCE
#include "os.h"
#include "tversion.h"
#include "taoserror.h"
#include "tdef.h"
int32_t taosVersionStrToInt(const char *vstr, int32_t *vint) {
if (vstr == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册