]> granicus.if.org Git - postgresql/commitdiff
Silence compiler warning about uninitialized variables. This initialization
authorItagaki Takahiro <itagaki.takahiro@gmail.com>
Wed, 6 Jan 2010 11:25:39 +0000 (11:25 +0000)
committerItagaki Takahiro <itagaki.takahiro@gmail.com>
Wed, 6 Jan 2010 11:25:39 +0000 (11:25 +0000)
is not necessary needed, but some compilers complain about it.

src/backend/commands/cluster.c

index 1b1053d8a87bbc18fc7d643e2cbcecdae3c68dbf..0f0ebd3ebc08dd8f06c1257ce1b072665cedd31d 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.191 2010/01/06 05:31:13 itagaki Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.192 2010/01/06 11:25:39 itagaki Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -849,10 +849,16 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
         * the visibility test.
         */
        if (OldIndex != NULL)
+       {
+               heapScan = NULL;
                indexScan = index_beginscan(OldHeap, OldIndex,
                                                   SnapshotAny, 0, (ScanKey) NULL);
+       }
        else
+       {
                heapScan = heap_beginscan(OldHeap, SnapshotAny, 0, (ScanKey) NULL);
+               indexScan = NULL;
+       }
 
        for (;;)
        {