Skip to content

Commit 1746b54

Browse files
author
Arthur Zakirov
committed
Make changes for C89
1 parent 514a01d commit 1746b54

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/catalog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ pgBackupCreateDir(pgBackup *backup)
476476
parray *external_list;
477477

478478
external_list = make_external_directory_list(backup->external_dir_str);
479-
for (int i = 0; i < parray_num(external_list); i++)
479+
for (i = 0; i < parray_num(external_list); i++)
480480
{
481481
char temp[MAXPGPATH];
482482
/* Numeration of externaldirs starts with 1 */

src/merge.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -673,10 +673,12 @@ merge_files(void *arg)
673673
static void
674674
remove_dir_with_files(const char *path)
675675
{
676-
parray *files = parray_new();
676+
parray *files = parray_new();
677+
int i;
678+
677679
dir_list_file(files, path, true, true, true, 0);
678680
parray_qsort(files, pgFileComparePathDesc);
679-
for (int i = 0; i < parray_num(files); i++)
681+
for (i = 0; i < parray_num(files); i++)
680682
{
681683
pgFile *file = (pgFile *) parray_get(files, i);
682684

@@ -689,9 +691,11 @@ remove_dir_with_files(const char *path)
689691
static int
690692
get_external_index(const char *key, const parray *list)
691693
{
694+
int i;
695+
692696
if (!list) /* Nowhere to search */
693697
return -1;
694-
for (int i = 0; i < parray_num(list); i++)
698+
for (i = 0; i < parray_num(list); i++)
695699
{
696700
if (strcmp(key, parray_get(list, i)) == 0)
697701
return i + 1;
@@ -704,11 +708,12 @@ static void
704708
reorder_external_dirs(pgBackup *to_backup, parray *to_external,
705709
parray *from_external)
706710
{
707-
char externaldir_template[MAXPGPATH];
711+
char externaldir_template[MAXPGPATH];
712+
int i;
708713

709714
pgBackupGetPath(to_backup, externaldir_template,
710715
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++)
712717
{
713718
int from_num = get_external_index(parray_get(to_external, i),
714719
from_external);

0 commit comments

Comments
 (0)