Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4c63a7e

Browse files
committed
Fix posible infinite loop
1 parent 50fe7c3 commit 4c63a7e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/backup.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2183,23 +2183,22 @@ parse_backup_filelist_filenames(parray *files, const char *root)
21832183
static void
21842184
set_cfs_datafiles(parray *files, const char *root, char *relative, size_t i)
21852185
{
2186-
int len;
2187-
size_t p;
2188-
pgFile *prev_file;
2189-
char *cfs_tblspc_path;
2190-
char *relative_prev_file;
2186+
int len;
2187+
int p;
2188+
pgFile *prev_file;
2189+
char *cfs_tblspc_path;
2190+
char *relative_prev_file;
21912191

21922192
cfs_tblspc_path = strdup(relative);
21932193
len = strlen("/pg_compression");
21942194
cfs_tblspc_path[strlen(cfs_tblspc_path) - len] = 0;
21952195
elog(VERBOSE, "CFS DIRECTORY %s, pg_compression path: %s", cfs_tblspc_path, relative);
21962196

2197-
for (p = i; p >= 0; p--)
2197+
for (p = (int) i; p >= 0; p--)
21982198
{
2199-
prev_file = (pgFile *) parray_get(files, p);
2199+
prev_file = (pgFile *) parray_get(files, (size_t) p);
22002200
relative_prev_file = GetRelativePath(prev_file->path, root);
22012201

2202-
//elog(VERBOSE, "P: %lu, Checking file in cfs tablespace %s", p, relative_prev_file);
22032202
elog(VERBOSE, "Checking file in cfs tablespace %s", relative_prev_file);
22042203

22052204
if (strstr(relative_prev_file, cfs_tblspc_path) != NULL)

0 commit comments

Comments
 (0)