Skip to content

Commit 1824440

Browse files
author
itagaki.takahiro
committed
Fix typo and cleanup.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@26 182aca00-e38e-11de-a668-6fd11605f5ce
1 parent 59d0911 commit 1824440

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dir_create_dir(const char *dir, mode_t mode)
3939
char *parent;
4040

4141
strncpy(copy, dir, MAXPGPATH);
42-
parent= dirname(copy);
42+
parent = dirname(copy);
4343
if (access(parent, F_OK) == -1)
4444
dir_create_dir(parent, mode);
4545
if (mkdir(dir, mode) == -1)

pg_rman.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ typedef enum BackupStatus
9595
typedef enum BackupMode
9696
{
9797
BACKUP_MODE_INVALID,
98-
BACKUP_MODE_ARCHIVE, /* arhicve only */
98+
BACKUP_MODE_ARCHIVE, /* archive only */
9999
BACKUP_MODE_INCREMENTAL, /* incremental backup */
100100
BACKUP_MODE_FULL /* full backup */
101101
} BackupMode;
@@ -280,6 +280,7 @@ extern bool is_pg_running(void);
280280
else \
281281
(logSeg)++; \
282282
} while (0)
283+
283284
#define MAXFNAMELEN 64
284285
#define XLogFileName(fname, tli, log, seg) \
285286
snprintf(fname, MAXFNAMELEN, "%08X%08X%08X", tli, log, seg)

restore.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ do_restore(const char *target_time,
281281
elog(INFO, _("restore complete. Recovery starts automatically when the PostgreSQL server is started."));
282282

283283
return 0;
284-
}
284+
}
285285

286286
/*
287287
* Validate and restore backup.
@@ -327,15 +327,15 @@ restore_database(pgBackup *backup)
327327

328328
/* keep orginal directory */
329329
if (getcwd(pwd, sizeof(pwd)) == NULL)
330-
elog(ERROR_SYSTEM, _("can't get current working directoryh: %s"),
330+
elog(ERROR_SYSTEM, _("can't get current working directory: %s"),
331331
strerror(errno));
332332

333333
/* create pgdata directory */
334334
dir_create_dir(pgdata, DIR_PERMISSION);
335335

336336
/* change directory to pgdata */
337337
if (chdir(pgdata))
338-
elog(ERROR_SYSTEM, _("can't change directoryh: %s"),
338+
elog(ERROR_SYSTEM, _("can't change directory: %s"),
339339
strerror(errno));
340340

341341
/* Execute mkdirs.sh */
@@ -346,7 +346,7 @@ restore_database(pgBackup *backup)
346346

347347
/* go back to original directory */
348348
if (chdir(pwd))
349-
elog(ERROR_SYSTEM, _("can't change directoryh: %s"),
349+
elog(ERROR_SYSTEM, _("can't change directory: %s"),
350350
strerror(errno));
351351
}
352352

xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ bool
104104
xlog_logfname2lsn(const char *logfname, XLogRecPtr *lsn)
105105
{
106106
uint32 tli;
107+
107108
if (sscanf(logfname, "%08X%08X%08X",
108109
&tli, &lsn->xlogid, &lsn->xrecoff) != 3)
109110
return false;
110111

111112
lsn->xrecoff *= XLogSegSize;
112-
113113
return true;
114114
}
115115

0 commit comments

Comments
 (0)