diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2018-04-08 19:30:38 +0300 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2018-04-08 19:30:38 +0300 |
commit | 34602b0a1dfd41400d376e73e41ad868ad2d3ce8 (patch) | |
tree | da3dd93c27a221a52b15ce74ea4db891946211ea /src | |
parent | 2fa55f26a0c56f40b71f96859280dc5d11751514 (diff) | |
download | postgresql-34602b0a1dfd41400d376e73e41ad868ad2d3ce8.tar.gz postgresql-34602b0a1dfd41400d376e73e41ad868ad2d3ce8.zip |
Remove unused variable in non-assert-enabled build
Use field of structure in Assert directly
Jeff Janes
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/common/indextuple.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c index a9c0b620ec0..9b3e0a2e6ea 100644 --- a/src/backend/access/common/indextuple.c +++ b/src/backend/access/common/indextuple.c @@ -459,11 +459,10 @@ index_truncate_tuple(TupleDesc tupleDescriptor, IndexTuple olditup, Datum values[INDEX_MAX_KEYS]; bool isnull[INDEX_MAX_KEYS]; IndexTuple newitup; - int indnatts = tupleDescriptor->natts; - Assert(indnatts <= INDEX_MAX_KEYS); + Assert(tupleDescriptor->natts <= INDEX_MAX_KEYS); Assert(new_indnatts > 0); - Assert(new_indnatts < indnatts); + Assert(new_indnatts < tupleDescriptor->natts); index_deform_tuple(olditup, tupleDescriptor, values, isnull); |