more define

This commit is contained in:
Hongze Cheng 2024-07-15 16:08:20 +08:00
parent 8907acec36
commit bc70d8e338
1 changed files with 6 additions and 6 deletions

View File

@ -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 TAOS_RETURN(code) \
do { \
return (terrno = (code)); \
} while (0)
#define TAOS_CHECK_RETURN(CMD) \
do { \
int32_t code = (CMD); \
if (code != TSDB_CODE_SUCCESS) { \
return (terrno = code); \
TAOS_RETURN(code); \
} \
} while (0)
@ -165,11 +170,6 @@ static FORCE_INLINE int32_t taosGetTbHashVal(const char *tbname, int32_t tblen,
} \
} while (0)
#define TAOS_RETURN(code) \
do { \
return (terrno = (code)); \
} while (0)
#ifdef __cplusplus
}
#endif