@@ -1964,11 +1964,12 @@ parse_backup_filelist_filenames(parray *files, const char *root)
1964
1964
{
1965
1965
pgFile * file = (pgFile * ) parray_get (files , i );
1966
1966
char * relative ;
1967
- char * filename = palloc ( MAXPGPATH ) ;
1967
+ char filename [ MAXPGPATH ] ;
1968
1968
int sscanf_result ;
1969
1969
1970
1970
relative = GetRelativePath (file -> path , root );
1971
1971
file -> is_cfs = false;
1972
+ filename [0 ] = '\0' ;
1972
1973
1973
1974
elog (VERBOSE , "-----------------------------------------------------: %s" , relative );
1974
1975
if (path_is_prefix_of_path ("global" , relative ))
@@ -2010,7 +2011,7 @@ parse_backup_filelist_filenames(parray *files, const char *root)
2010
2011
}
2011
2012
else if (path_is_prefix_of_path (PG_TBLSPC_DIR , relative ))
2012
2013
{
2013
- char * temp_relative_path = palloc ( MAXPGPATH ) ;
2014
+ char temp_relative_path [ MAXPGPATH ] ;
2014
2015
2015
2016
sscanf_result = sscanf (relative , "pg_tblspc/%u/%s" , & (file -> tblspcOid ), temp_relative_path );
2016
2017
elog (VERBOSE , "pg_tblspc sscanf result: %i" , sscanf_result );
@@ -2084,7 +2085,7 @@ parse_backup_filelist_filenames(parray *files, const char *root)
2084
2085
}
2085
2086
2086
2087
/* Check files located inside database directories */
2087
- if (filename && file -> dbOid != 0 )
2088
+ if (filename [ 0 ] != '\0' && file -> dbOid != 0 )
2088
2089
{
2089
2090
if (strcmp (filename , "pg_internal.init" ) == 0 )
2090
2091
{
@@ -2111,7 +2112,7 @@ parse_backup_filelist_filenames(parray *files, const char *root)
2111
2112
* Check that and do not mark them with 'is_datafile' flag.
2112
2113
*/
2113
2114
char * forkNameptr ;
2114
- char * suffix = palloc ( MAXPGPATH ) ;
2115
+ char suffix [ MAXPGPATH ] ;
2115
2116
2116
2117
forkNameptr = strstr (filename , "_" );
2117
2118
if (forkNameptr != NULL )
0 commit comments