diff --git a/backup.c b/backup.c index 14339afa..bda24049 100644 --- a/backup.c +++ b/backup.c @@ -125,7 +125,7 @@ do_backup_database(parray *backup_list, bool smooth_checkpoint) prev_files = dir_read_file_list(pgdata, prev_file_txt); /* - * we back up only a page updated later than LSN of preview backup. + * Do backup only pages having larger LSN than previous backup. */ lsn = &prev_backup->start_lsn; elog(LOG, _("backup only the page that there was of the update from LSN(%X/%08X).\n"), @@ -186,7 +186,7 @@ do_backup_database(parray *backup_list, bool smooth_checkpoint) fclose(fp); } - /* print sumarry of size of backup mode files */ + /* print summary of size of backup mode files */ for (i = 0; i < parray_num(files); i++) { pgFile *file = (pgFile *) parray_get(files, i); @@ -295,7 +295,7 @@ do_backup_arclog(parray *backup_list) fclose(fp); } - /* print sumarry of size of backup files */ + /* print summary of size of backup files */ for (i = 0; i < parray_num(files); i++) { pgFile *file = (pgFile *) parray_get(files, i); @@ -400,7 +400,7 @@ do_backup_srvlog(parray *backup_list) fclose(fp); } - /* print sumarry of size of backup mode files */ + /* print summary of size of backup mode files */ for (i = 0; i < parray_num(files); i++) { pgFile *file = (pgFile *) parray_get(files, i); @@ -468,7 +468,7 @@ do_backup(bool smooth_checkpoint, /* setup cleanup callback function */ in_backup = true; - /* show configuration acutally used */ + /* show configuration actually used */ if (verbose) { printf(_("========================================\n")); @@ -1075,7 +1075,7 @@ delete_online_wal_backup(void) } /* - * Remove symbolic links point ardchived WAL in backup catalog. + * Remove symbolic links point archived WAL in backup catalog. */ static void delete_arclog_link(void) diff --git a/catalog.c b/catalog.c index 40e327b0..65b4ccbf 100644 --- a/catalog.c +++ b/catalog.c @@ -182,7 +182,7 @@ catalog_get_backup_list(const pgBackupRange *range) { char ini_path[MAXPGPATH]; - /* skip not-directry and hidden directories */ + /* skip not-directory and hidden directories */ if (!IsDir(date_path, date_dir, time_ent) || time_ent->d_name[0] == '.') continue; @@ -530,7 +530,7 @@ pgBackupFree(void *backup) free(backup); } -/* Compare two pgBackup with their ID (start time) in ascending order */ +/* Compare two pgBackup with their IDs (start time) in ascending order */ int pgBackupCompareId(const void *l, const void *r) { @@ -545,7 +545,7 @@ pgBackupCompareId(const void *l, const void *r) return 0; } -/* Compare two pgBackup with their ID in descending order */ +/* Compare two pgBackup with their IDs in descending order */ int pgBackupCompareIdDesc(const void *l, const void *r) { diff --git a/dir.c b/dir.c index 65a9a5e2..49c9cccb 100644 --- a/dir.c +++ b/dir.c @@ -26,7 +26,7 @@ const char *pgdata_exclude[] = "pgsql_tmp", NULL, /* arclog_path will be set later */ NULL, /* srvlog_path will be set later */ - NULL, /* centinel */ + NULL, /* sentinel */ }; static pgFile *pgFileNew(const char *path, bool omit_symlink); @@ -246,8 +246,8 @@ dir_list_file(parray *files, const char *root, const char *exclude[], bool omit_ /* chase symbolic link chain and find regular file or directory */ while (S_ISLNK(file->mode)) { - ssize_t len; - char linked[MAXPGPATH]; + ssize_t len; + char linked[MAXPGPATH]; len = readlink(file->path, linked, sizeof(linked)); if (len == -1) @@ -261,9 +261,9 @@ dir_list_file(parray *files, const char *root, const char *exclude[], bool omit_ /* make absolute path to read linked file */ if (linked[0] != '/') { - char dname[MAXPGPATH]; - char *dnamep; - char absolute[MAXPGPATH]; + char dname[MAXPGPATH]; + char *dnamep; + char absolute[MAXPGPATH]; strncpy(dname, file->path, lengthof(dname)); dnamep = dirname(dname); @@ -273,7 +273,7 @@ dir_list_file(parray *files, const char *root, const char *exclude[], bool omit_ else file = pgFileNew(file->linked, omit_symlink); - /* linked file is not found, stop chasing link chain */ + /* linked file is not found, stop following link chain */ if (file == NULL) return; @@ -301,7 +301,7 @@ dir_list_file(parray *files, const char *root, const char *exclude[], bool omit_ dirname++; /* - * If the item in the exclude list starts with '/', compare to th + * If the item in the exclude list starts with '/', compare to the * absolute path of the directory. Otherwise compare to the directory * name portion. */ @@ -362,7 +362,7 @@ dir_list_file(parray *files, const char *root, const char *exclude[], bool omit_ } closedir(dir); - break; /* psuedo loop */ + break; /* pseudo loop */ } parray_qsort(files, pgFileComparePath); @@ -416,7 +416,8 @@ dir_print_file_list(FILE *out, const parray *files, const char *root) } /* print each file in the list */ - for (i = 0; i < parray_num(files); i++) { + for (i = 0; i < parray_num(files); i++) + { pgFile *file = (pgFile *)parray_get(files, i); char *path = file->path; char type; diff --git a/restore.c b/restore.c index e670d042..908cd5b2 100644 --- a/restore.c +++ b/restore.c @@ -736,7 +736,7 @@ readTimeLineHistory(TimeLineID targetTLI) */ while (fd && fgets(fline, sizeof(fline), fd) != NULL) { - /* skip leading whitespace and check for # comment */ + /* skip leading whitespaces and check for # comment */ char *ptr; char *endptr;