aboutsummaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/pg_dump/pg_backup_tar.c6
-rw-r--r--src/bin/pg_dump/pg_backup_tar.h10
-rw-r--r--src/bin/psql/print.c6
3 files changed, 10 insertions, 12 deletions
diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c
index 38c84d9b482..87f53e17d55 100644
--- a/src/bin/pg_dump/pg_backup_tar.c
+++ b/src/bin/pg_dump/pg_backup_tar.c
@@ -16,7 +16,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.25 2002/08/20 17:54:44 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.26 2002/08/28 20:46:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1189,12 +1189,10 @@ static void
_tarWriteHeader(TAR_MEMBER *th)
{
char h[512];
- int i;
int lastSum = 0;
int sum;
- for (i = 0; i < 512; i++)
- h[i] = '\0';
+ memset(h, 0, sizeof(h));
/* Name 100 */
sprintf(&h[0], "%.99s", th->targetFile);
diff --git a/src/bin/pg_dump/pg_backup_tar.h b/src/bin/pg_dump/pg_backup_tar.h
index a183e248996..bfaa456a161 100644
--- a/src/bin/pg_dump/pg_backup_tar.h
+++ b/src/bin/pg_dump/pg_backup_tar.h
@@ -1,10 +1,10 @@
/*
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.h,v 1.3 2001/03/22 04:00:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_tar.h,v 1.4 2002/08/28 20:46:24 momjian Exp $
*
* TAR Header
*
* Offset Length Contents
- * 0 100 bytes File name ('\0' terminated, 99 maxmum length)
+ * 0 100 bytes File name ('\0' terminated, 99 maximum length)
* 100 8 bytes File mode (in octal ascii)
* 108 8 bytes User ID (in octal ascii)
* 116 8 bytes Group ID (in octal ascii)
@@ -12,10 +12,10 @@
* 136 12 bytes Modify time (in octal ascii)
* 148 8 bytes Header checksum (in octal ascii)
* 156 1 bytes Link flag
- * 157 100 bytes Linkname ('\0' terminated, 99 maxmum length)
+ * 157 100 bytes Linkname ('\0' terminated, 99 maximum length)
* 257 8 bytes Magic ("ustar \0")
- * 265 32 bytes User name ('\0' terminated, 31 maxmum length)
- * 297 32 bytes Group name ('\0' terminated, 31 maxmum length)
+ * 265 32 bytes User name ('\0' terminated, 31 maximum length)
+ * 297 32 bytes Group name ('\0' terminated, 31 maximum length)
* 329 8 bytes Major device ID (in octal ascii)
* 337 8 bytes Minor device ID (in octal ascii)
* 345 167 bytes Padding
diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c
index f8dd092d677..bd0366528f5 100644
--- a/src/bin/psql/print.c
+++ b/src/bin/psql/print.c
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.29 2002/08/27 20:16:48 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.30 2002/08/28 20:46:24 momjian Exp $
*/
#include "postgres_fe.h"
#include "print.h"
@@ -494,9 +494,9 @@ print_aligned_vertical(const char *title, const char *const * headers,
}
if (opt_border == 0)
- sprintf(record_str, "* Record %d", record++);
+ snprintf(record_str, 32, "* Record %d", record++);
else
- sprintf(record_str, "[ RECORD %d ]", record++);
+ snprintf(record_str, 32, "[ RECORD %d ]", record++);
record_str_len = strlen(record_str);
if (record_str_len + opt_border > strlen(divider))