diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 08d27fd86f6b73a98ecfbcadd2c7fb7c05fdd74a..1dcbf12290934136102e967e4b4ab24b54a6d493 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -1747,7 +1747,7 @@ static int32_t parseSmlMeasurement(TAOS_SML_DATA_POINT *pSml, const char **index static int32_t isValidChildTableName(const char *pTbName, int16_t len) { const char *cur = pTbName; for (int i = 0; i < len; ++i) { - if(!isdigit(cur[i]) && !isalpha(cur[i]) && cur[i] != '_') { + if(!isdigit(cur[i]) && !isalpha(cur[i]) && (cur[i] != '_')) { return TSDB_CODE_TSC_LINE_SYNTAX_ERROR; } } @@ -1789,7 +1789,7 @@ static int32_t parseSmlKvPairs(TAOS_SML_KV **pKVs, int *num_kvs, if (!isField && (strcasecmp(pkv->key, "ID") == 0) && pkv->type == TSDB_DATA_TYPE_BINARY) { ret = isValidChildTableName(pkv->value, pkv->length); - if (!ret) { + if (ret) { goto error; } smlData->childTableName = malloc( pkv->length + 1);