mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-18 11:45:11 +08:00
Make code logic clear for coverity test
Homogenizes condition for using correct scan method and resolving coverity test complain.
This commit is contained in:
parent
dd753f2a3c
commit
5df7946e88
@ -729,6 +729,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
|
||||
|
||||
CHECK_FOR_INTERRUPTS();
|
||||
|
||||
Assert((heapScan != NULL && indexScan == NULL) || (indexScan != NULL && heapScan == NULL));
|
||||
if (indexScan != NULL)
|
||||
{
|
||||
tuple = index_getnext(indexScan, ForwardScanDirection);
|
||||
@ -741,7 +742,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
|
||||
|
||||
buf = indexScan->xs_cbuf;
|
||||
}
|
||||
else
|
||||
if (heapScan != NULL)
|
||||
{
|
||||
tuple = heap_getnext(heapScan, ForwardScanDirection);
|
||||
if (tuple == NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user