[TD-225]fix compiler error.

This commit is contained in:
Haojun Liao 2021-01-20 11:49:08 +08:00
parent 986aff05d4
commit 061de3e69e
1 changed files with 2 additions and 2 deletions

View File

@ -398,7 +398,7 @@ int32_t tNameFromString(SName* dst, const char* str, uint32_t type) {
int32_t len = 0; int32_t len = 0;
p = strstr(start, TS_PATH_DELIMITER); p = strstr(start, TS_PATH_DELIMITER);
if (p == NULL) { if (p == NULL) {
len = strlen(start); len = (int32_t) strlen(start);
} else { } else {
len = p - start; len = p - start;
} }
@ -416,7 +416,7 @@ int32_t tNameFromString(SName* dst, const char* str, uint32_t type) {
dst->type = TSDB_TABLE_NAME_T; dst->type = TSDB_TABLE_NAME_T;
char* start = (char*) ((p == NULL)? str: (p+1)); char* start = (char*) ((p == NULL)? str: (p+1));
int32_t len = strlen(start); int32_t len = (int32_t) strlen(start);
// too long account id or too long db name // too long account id or too long db name
if (len >= tListLen(dst->tname) || len == 0) { if (len >= tListLen(dst->tname) || len == 0) {