fix: remove redundant check

This commit is contained in:
zhangmazi
2023-09-04 11:15:38 +08:00
parent eda81ee7ee
commit bbc9c23d88

View File

@ -466,9 +466,7 @@ static void UBTreeRecsplitloc(FindSplitData *state, OffsetNumber firstoldonright
* data from the first item that winds up on the right page. * data from the first item that winds up on the right page.
*/ */
if (!state->is_leaf) { if (!state->is_leaf) {
int indexTupleDataSize = state->is_leaf ? int indexTupleDataSize = (MAXALIGN(sizeof(IndexTupleData)) - TXNINFOSIZE);
MAXALIGN(sizeof(IndexTupleData)) :
(MAXALIGN(sizeof(IndexTupleData)) - TXNINFOSIZE);
rightfree += (int16)firstrightitemsz - (int16)(indexTupleDataSize + sizeof(ItemIdData)); rightfree += (int16)firstrightitemsz - (int16)(indexTupleDataSize + sizeof(ItemIdData));
} }