more define
This commit is contained in:
parent
8907acec36
commit
bc70d8e338
|
@ -147,11 +147,16 @@ static FORCE_INLINE int32_t taosGetTbHashVal(const char *tbname, int32_t tblen,
|
||||||
|
|
||||||
#define TCONTAINER_OF(ptr, type, member) ((type *)((char *)(ptr)-offsetof(type, member)))
|
#define TCONTAINER_OF(ptr, type, member) ((type *)((char *)(ptr)-offsetof(type, member)))
|
||||||
|
|
||||||
|
#define TAOS_RETURN(code) \
|
||||||
|
do { \
|
||||||
|
return (terrno = (code)); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define TAOS_CHECK_RETURN(CMD) \
|
#define TAOS_CHECK_RETURN(CMD) \
|
||||||
do { \
|
do { \
|
||||||
int32_t code = (CMD); \
|
int32_t code = (CMD); \
|
||||||
if (code != TSDB_CODE_SUCCESS) { \
|
if (code != TSDB_CODE_SUCCESS) { \
|
||||||
return (terrno = code); \
|
TAOS_RETURN(code); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
@ -165,11 +170,6 @@ static FORCE_INLINE int32_t taosGetTbHashVal(const char *tbname, int32_t tblen,
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define TAOS_RETURN(code) \
|
|
||||||
do { \
|
|
||||||
return (terrno = (code)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue