change the macro

This commit is contained in:
Hongze Cheng 2024-07-15 19:29:27 +08:00
parent 7bbe84a1b0
commit f3e2ba31dd
1 changed files with 9 additions and 8 deletions

View File

@ -160,14 +160,15 @@ static FORCE_INLINE int32_t taosGetTbHashVal(const char *tbname, int32_t tblen,
} \ } \
} while (0) } while (0)
#define TAOS_CHECK_GOTO(CODE, LINO, LABEL) \ #define TAOS_CHECK_GOTO(CMD, LINO, LABEL) \
do { \ do { \
if ((CODE) != TSDB_CODE_SUCCESS) { \ code = (CMD); \
if (LINO) { \ if (code != TSDB_CODE_SUCCESS) { \
*((int32_t *)(LINO)) = __LINE__; \ if (LINO) { \
} \ *((int32_t *)(LINO)) = __LINE__; \
goto LABEL; \ } \
} \ goto LABEL; \
} \
} while (0) } while (0)
#ifdef __cplusplus #ifdef __cplusplus