diff --git a/src/common/src/tvariant.c b/src/common/src/tvariant.c index 33dab51633b244326b0490c6bf7b784bc41fe77f..3f9e21998348b72989c062ca269f2d59d3ace3cf 100644 --- a/src/common/src/tvariant.c +++ b/src/common/src/tvariant.c @@ -31,12 +31,12 @@ void tVariantCreate(tVariant *pVar, SStrToken *token) { switch (token->type) { case TSDB_DATA_TYPE_BOOL: { - int32_t k = strncasecmp(token->z, "true", 4); - if (k == 0) { + if (strncasecmp(token->z, "true", 4) == 0) { pVar->i64 = TSDB_TRUE; - } else { - assert(strncasecmp(token->z, "false", 5) == 0); + } else if (strncasecmp(token->z, "false", 5) == 0) { pVar->i64 = TSDB_FALSE; + } else { + return; } break;