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

Lines changed: 2 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy