Skip to content

Commit da2c49d

Browse files
committed
code cleanup
1 parent 94d4236 commit da2c49d

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

src/dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* start so they are not included in backups. The directories themselves are
2929
* kept and included as empty to preserve access permissions.
3030
*/
31-
const char *pgdata_exclude_dir[] =
31+
static const char *pgdata_exclude_dir[] =
3232
{
3333
PG_XLOG_DIR,
3434
/*

src/pg_probackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ bool force = false;
104104
bool dry_run = false;
105105
static char *delete_status = NULL;
106106
/* compression options */
107-
bool compress_shortcut = false;
107+
static bool compress_shortcut = false;
108108

109109
/* other options */
110110
char *instance_name;

src/pg_probackup.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -672,16 +672,6 @@ typedef struct BackupPageHeader2
672672
#define PageIsTruncated -2
673673
#define PageIsCorrupted -3 /* used by checkdb */
674674

675-
676-
/*
677-
* return pointer that exceeds the length of prefix from character string.
678-
* ex. str="/xxx/yyy/zzz", prefix="/xxx/yyy", return="zzz".
679-
*
680-
* Deprecated. Do not use this in new code.
681-
*/
682-
#define GetRelativePath(str, prefix) \
683-
((strlen(str) <= strlen(prefix)) ? "" : str + strlen(prefix) + 1)
684-
685675
/*
686676
* Return timeline, xlog ID and record offset from an LSN of the type
687677
* 0/B000188, usual result from pg_stop_backup() and friends.
@@ -789,9 +779,6 @@ extern bool delete_expired;
789779
extern bool merge_expired;
790780
extern bool dry_run;
791781

792-
/* compression options */
793-
extern bool compress_shortcut;
794-
795782
/* other options */
796783
extern char *instance_name;
797784

@@ -808,10 +795,6 @@ extern pgBackup current;
808795
/* argv of the process */
809796
extern char** commands_args;
810797

811-
/* in dir.c */
812-
/* exclude directory list for $PGDATA file listing */
813-
extern const char *pgdata_exclude_dir[];
814-
815798
/* in backup.c */
816799
extern int do_backup(pgSetBackupParams *set_backup_params,
817800
bool no_validate, bool no_sync, bool backup_logs);

0 commit comments

Comments
 (0)