Skip to content

Commit 34602b0

Browse files
committed
Remove unused variable in non-assert-enabled build
Use field of structure in Assert directly Jeff Janes
1 parent 2fa55f2 commit 34602b0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/backend/access/common/indextuple.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,10 @@ index_truncate_tuple(TupleDesc tupleDescriptor, IndexTuple olditup,
459459
Datum values[INDEX_MAX_KEYS];
460460
bool isnull[INDEX_MAX_KEYS];
461461
IndexTuple newitup;
462-
int indnatts = tupleDescriptor->natts;
463462

464-
Assert(indnatts <= INDEX_MAX_KEYS);
463+
Assert(tupleDescriptor->natts <= INDEX_MAX_KEYS);
465464
Assert(new_indnatts > 0);
466-
Assert(new_indnatts < indnatts);
465+
Assert(new_indnatts < tupleDescriptor->natts);
467466

468467
index_deform_tuple(olditup, tupleDescriptor, values, isnull);
469468

0 commit comments

Comments
 (0)