summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_tar.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-10-04 00:30:14 +0000
committerBruce Momjian <bruce@momjian.us>2006-10-04 00:30:14 +0000
commitf99a569a2ee3763b4ae174e81250c95ca0fdcbb6 (patch)
tree76e6371fe8b347c73d7020c0bc54b9fba519dc10 /src/bin/pg_dump/pg_backup_tar.c
parent451e419e9852cdf9d7e7cefc09d5355abb3405e9 (diff)
pgindent run for 8.2.
Diffstat (limited to 'src/bin/pg_dump/pg_backup_tar.c')
-rw-r--r--src/bin/pg_dump/pg_backup_tar.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c
index 9b0606b7537..51d783b1a51 100644
--- a/src/bin/pg_dump/pg_backup_tar.c
+++ b/src/bin/pg_dump/pg_backup_tar.c
@@ -16,7 +16,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.54 2006/06/27 02:56:41 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.55 2006/10/04 00:30:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -363,16 +363,17 @@ tarOpen(ArchiveHandle *AH, const char *filename, char mode)
#ifndef WIN32
tm->tmpFH = tmpfile();
#else
+
/*
- * On WIN32, tmpfile() generates a filename in the root directory,
- * which requires administrative permissions on certain systems.
- * Loop until we find a unique file name we can create.
+ * On WIN32, tmpfile() generates a filename in the root directory,
+ * which requires administrative permissions on certain systems. Loop
+ * until we find a unique file name we can create.
*/
while (1)
{
- char *name;
- int fd;
-
+ char *name;
+ int fd;
+
name = _tempnam(NULL, "pg_temp_");
if (name == NULL)
break;
@@ -380,7 +381,7 @@ tarOpen(ArchiveHandle *AH, const char *filename, char mode)
O_TEMPORARY, S_IRUSR | S_IWUSR);
free(name);
- if (fd != -1) /* created a file */
+ if (fd != -1) /* created a file */
{
tm->tmpFH = fdopen(fd, "w+b");
break;
@@ -1060,7 +1061,7 @@ _tarAddFile(ArchiveHandle *AH, TAR_MEMBER *th)
res = fwrite(&buf[0], 1, cnt, th->tarFH);
if (res != cnt)
die_horribly(AH, modulename,
- "could not write to output file: %s\n", strerror(errno));
+ "could not write to output file: %s\n", strerror(errno));
len += res;
}