minor changes
This commit is contained in:
parent
4cbfc4f82b
commit
87b63a9fbe
|
@ -20,8 +20,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
|
|
||||||
#define TAOS_DEF_ERROR_CODE(mod, code) ((int32_t)((0x80000000 | ((mod)<<16) | (code))))
|
#define TAOS_DEF_ERROR_CODE(mod, code) ((int32_t)((0x80000000 | ((mod)<<16) | (code))))
|
||||||
|
|
||||||
#define TAOS_SYSTEM_ERROR(code) (0x80ff0000 | (code))
|
#define TAOS_SYSTEM_ERROR(code) (0x80ff0000 | (code))
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
#ifndef _TD_UTIL_VERSION_H_
|
#ifndef _TD_UTIL_VERSION_H_
|
||||||
#define _TD_UTIL_VERSION_H_
|
#define _TD_UTIL_VERSION_H_
|
||||||
|
|
||||||
|
#include "os.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -158,12 +158,12 @@ void taosqsort(void *src, int64_t numOfElem, int64_t size, const void *param, __
|
||||||
tfree(buf);
|
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
|
// TODO: need to check the correctness of this function
|
||||||
int l = 0;
|
int32_t l = 0;
|
||||||
int r = (int)nmemb;
|
int32_t r = (int32_t)nmemb;
|
||||||
int idx = 0;
|
int32_t idx = 0;
|
||||||
int comparison;
|
int32_t comparison;
|
||||||
|
|
||||||
if (flags == TD_EQ) {
|
if (flags == TD_EQ) {
|
||||||
return bsearch(key, base, nmemb, size, compar);
|
return bsearch(key, base, nmemb, size, compar);
|
||||||
|
|
|
@ -14,9 +14,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "os.h"
|
#include "tversion.h"
|
||||||
#include "taoserror.h"
|
#include "taoserror.h"
|
||||||
#include "tdef.h"
|
|
||||||
|
|
||||||
int32_t taosVersionStrToInt(const char *vstr, int32_t *vint) {
|
int32_t taosVersionStrToInt(const char *vstr, int32_t *vint) {
|
||||||
if (vstr == NULL) {
|
if (vstr == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue