diff options
Diffstat (limited to 'contrib/pg_xlogdump')
-rw-r--r-- | contrib/pg_xlogdump/compat.c | 4 | ||||
-rw-r--r-- | contrib/pg_xlogdump/pg_xlogdump.c | 15 | ||||
-rw-r--r-- | contrib/pg_xlogdump/rmgrdesc.c | 1 | ||||
-rw-r--r-- | contrib/pg_xlogdump/rmgrdesc.h | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/contrib/pg_xlogdump/compat.c b/contrib/pg_xlogdump/compat.c index 3f3912193ae..bff76e85d40 100644 --- a/contrib/pg_xlogdump/compat.c +++ b/contrib/pg_xlogdump/compat.c @@ -41,7 +41,7 @@ timestamptz_to_time_t(TimestampTz t) /* * Stopgap implementation of timestamptz_to_str that doesn't depend on backend - * infrastructure. This will work for timestamps that are within the range + * infrastructure. This will work for timestamps that are within the range * of the platform time_t type. (pg_time_t is compatible except for possibly * being wider.) * @@ -77,7 +77,7 @@ timestamptz_to_str(TimestampTz dt) * be linked/called. */ void -appendStringInfo(StringInfo str, const char *fmt, ...) +appendStringInfo(StringInfo str, const char *fmt,...) { va_list args; diff --git a/contrib/pg_xlogdump/pg_xlogdump.c b/contrib/pg_xlogdump/pg_xlogdump.c index 1dd9034d531..70dc8d15d50 100644 --- a/contrib/pg_xlogdump/pg_xlogdump.c +++ b/contrib/pg_xlogdump/pg_xlogdump.c @@ -73,7 +73,7 @@ fatal_error(const char *fmt,...) static void print_rmgr_list(void) { - int i; + int i; for (i = 0; i < RM_MAX_ID + 1; i++) { @@ -88,7 +88,8 @@ print_rmgr_list(void) static bool verify_directory(const char *directory) { - DIR *dir = opendir(directory); + DIR *dir = opendir(directory); + if (dir == NULL) return false; closedir(dir); @@ -113,7 +114,7 @@ split_path(const char *path, char **dir, char **fname) if (sep != NULL) { *dir = pg_strdup(path); - (*dir)[(sep - path) + 1] = '\0'; /* no strndup */ + (*dir)[(sep - path) + 1] = '\0'; /* no strndup */ *fname = pg_strdup(sep + 1); } /* local directory */ @@ -596,7 +597,7 @@ main(int argc, char **argv) else if (!XLByteInSeg(private.startptr, segno)) { fprintf(stderr, - "%s: start log position %X/%X is not inside file \"%s\"\n", + "%s: start log position %X/%X is not inside file \"%s\"\n", progname, (uint32) (private.startptr >> 32), (uint32) private.startptr, @@ -672,9 +673,9 @@ main(int argc, char **argv) (uint32) private.startptr); /* - * Display a message that we're skipping data if `from` wasn't a pointer to - * the start of a record and also wasn't a pointer to the beginning of a - * segment (e.g. we were used in file mode). + * Display a message that we're skipping data if `from` wasn't a pointer + * to the start of a record and also wasn't a pointer to the beginning of + * a segment (e.g. we were used in file mode). */ if (first_record != private.startptr && (private.startptr % XLogSegSize) != 0) printf("first record is after %X/%X, at %X/%X, skipping over %u bytes\n", diff --git a/contrib/pg_xlogdump/rmgrdesc.c b/contrib/pg_xlogdump/rmgrdesc.c index 0508c8dae91..13ab7457265 100644 --- a/contrib/pg_xlogdump/rmgrdesc.c +++ b/contrib/pg_xlogdump/rmgrdesc.c @@ -33,4 +33,3 @@ const RmgrDescData RmgrDescTable[RM_MAX_ID + 1] = { #include "access/rmgrlist.h" }; - diff --git a/contrib/pg_xlogdump/rmgrdesc.h b/contrib/pg_xlogdump/rmgrdesc.h index 2341739a14e..edf82577514 100644 --- a/contrib/pg_xlogdump/rmgrdesc.h +++ b/contrib/pg_xlogdump/rmgrdesc.h @@ -13,9 +13,9 @@ typedef struct RmgrDescData { const char *rm_name; - void (*rm_desc) (StringInfo buf, uint8 xl_info, char *rec); + void (*rm_desc) (StringInfo buf, uint8 xl_info, char *rec); } RmgrDescData; extern const RmgrDescData RmgrDescTable[]; -#endif /* RMGRDESC_H */ +#endif /* RMGRDESC_H */ |