提交 d8dd3d44 编写于 作者: H Haojun Liao

refactor: do some internal refactor.

上级 d208282a
......@@ -89,7 +89,7 @@ bool taosAssertRelease(bool condition);
// Disable all asserts that may compromise the performance.
#if defined DISABLE_ASSERT
#define ASSERT(condition)
#define ASSERTS(condition, ...)
#define ASSERTS(condition, ...) (0)
#else
#define ASSERTS(condition, ...) taosAssertDebug(condition, __FILE__, __LINE__, __VA_ARGS__)
#ifdef NDEBUG
......
......@@ -159,10 +159,6 @@ char *strtolower(char *dst, const char *src) {
int32_t esc = 0;
char quote = 0, *p = dst, c;
if (ASSERTS(dst != NULL, "dst is NULL")) {
return NULL;
}
for (c = *src++; c; c = *src++) {
if (esc) {
esc = 0;
......@@ -188,10 +184,6 @@ char *strntolower(char *dst, const char *src, int32_t n) {
int32_t esc = 0;
char quote = 0, *p = dst, c;
if (ASSERTS(dst != NULL, "dst is NULL")) {
return NULL;
}
if (n == 0) {
*p = 0;
return dst;
......@@ -219,11 +211,6 @@ char *strntolower(char *dst, const char *src, int32_t n) {
char *strntolower_s(char *dst, const char *src, int32_t n) {
char *p = dst, c;
if (ASSERTS(dst != NULL, "dst is NULL")) {
return NULL;
}
if (n == 0) {
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册