[4.x] set default value for some items

This commit is contained in:
joseph12138
2023-09-14 13:10:11 +00:00
committed by ob-robot
parent cc86072c8a
commit 5f09352d33
14 changed files with 38 additions and 38 deletions

View File

@ -191,7 +191,7 @@ int ObTransferTabletInfo::init(
int ObTransferTabletInfo::parse_from_display_str(const common::ObString &str)
{
int ret = OB_SUCCESS;
uint64_t tablet_id;
uint64_t tablet_id = 0;
errno = 0;
if (OB_UNLIKELY(2 != sscanf(str.ptr(), "%lu:%ld", &tablet_id, &transfer_seq_))) {
ret = OB_INVALID_ARGUMENT;
@ -281,7 +281,7 @@ bool ObTransferPartInfo::operator==(const ObTransferPartInfo &other) const
int ObDisplayTabletID::parse_from_display_str(const common::ObString &str)
{
int ret = OB_SUCCESS;
uint64_t tablet_id;
uint64_t tablet_id = 0;
errno = 0;
if (OB_UNLIKELY(1 != sscanf(str.ptr(), "%lu", &tablet_id))) {
ret = OB_INVALID_ARGUMENT;
@ -749,4 +749,4 @@ int ObTransferLockUtil::process_table_lock_on_tablets_(
LOG_WARN("invalid lock arg", KR(ret), K(lock_arg));
}
return ret;
}
}