diff options
author | Bruce Momjian <bruce@momjian.us> | 2013-05-29 16:58:43 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2013-05-29 16:58:43 -0400 |
commit | 9af4159fce6654aa0e081b00d02bca40b978745c (patch) | |
tree | 3aa507fc6cc67ed3d9f6ceec4d65d1e56cc08e1a /src/bin/pg_ctl/pg_ctl.c | |
parent | 07ab261ef3a9575a4a2bd3045b222d7b3dee2c46 (diff) | |
download | postgresql-9af4159fce6654aa0e081b00d02bca40b978745c.tar.gz postgresql-9af4159fce6654aa0e081b00d02bca40b978745c.zip |
pgindent run for release 9.3
This is the first run of the Perl-based pgindent script. Also update
pgindent instructions.
Diffstat (limited to 'src/bin/pg_ctl/pg_ctl.c')
-rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 8113e507cbf..9045e00a1db 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -285,7 +285,7 @@ readfile(const char *path) int i; int n; int len; - struct stat statbuf; + struct stat statbuf; /* * Slurp the file into memory. @@ -344,8 +344,9 @@ readfile(const char *path) { if (buffer[i] == '\n') { - int slen = &buffer[i] - linebegin + 1; - char *linebuf = pg_malloc(slen + 1); + int slen = &buffer[i] - linebegin + 1; + char *linebuf = pg_malloc(slen + 1); + memcpy(linebuf, linebegin, slen); linebuf[slen] = '\0'; result[n++] = linebuf; @@ -1098,10 +1099,10 @@ do_promote(void) } /* - * For 9.3 onwards, use fast promotion as the default option. - * Promotion with a full checkpoint is still possible by writing - * a file called "promote", e.g. - * snprintf(promote_file, MAXPGPATH, "%s/promote", pg_data); + * For 9.3 onwards, use fast promotion as the default option. Promotion + * with a full checkpoint is still possible by writing a file called + * "promote", e.g. snprintf(promote_file, MAXPGPATH, "%s/promote", + * pg_data); */ snprintf(promote_file, MAXPGPATH, "%s/fast_promote", pg_data); |