@@ -673,10 +673,12 @@ merge_files(void *arg)
673
673
static void
674
674
remove_dir_with_files (const char * path )
675
675
{
676
- parray * files = parray_new ();
676
+ parray * files = parray_new ();
677
+ int i ;
678
+
677
679
dir_list_file (files , path , true, true, true, 0 );
678
680
parray_qsort (files , pgFileComparePathDesc );
679
- for (int i = 0 ; i < parray_num (files ); i ++ )
681
+ for (i = 0 ; i < parray_num (files ); i ++ )
680
682
{
681
683
pgFile * file = (pgFile * ) parray_get (files , i );
682
684
@@ -689,9 +691,11 @@ remove_dir_with_files(const char *path)
689
691
static int
690
692
get_external_index (const char * key , const parray * list )
691
693
{
694
+ int i ;
695
+
692
696
if (!list ) /* Nowhere to search */
693
697
return -1 ;
694
- for (int i = 0 ; i < parray_num (list ); i ++ )
698
+ for (i = 0 ; i < parray_num (list ); i ++ )
695
699
{
696
700
if (strcmp (key , parray_get (list , i )) == 0 )
697
701
return i + 1 ;
@@ -704,11 +708,12 @@ static void
704
708
reorder_external_dirs (pgBackup * to_backup , parray * to_external ,
705
709
parray * from_external )
706
710
{
707
- char externaldir_template [MAXPGPATH ];
711
+ char externaldir_template [MAXPGPATH ];
712
+ int i ;
708
713
709
714
pgBackupGetPath (to_backup , externaldir_template ,
710
715
lengthof (externaldir_template ), EXTERNAL_DIR );
711
- for (int i = 0 ; i < parray_num (to_external ); i ++ )
716
+ for (i = 0 ; i < parray_num (to_external ); i ++ )
712
717
{
713
718
int from_num = get_external_index (parray_get (to_external , i ),
714
719
from_external );
0 commit comments