aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/fsync/test_fsync.c12
-rw-r--r--src/tools/thread/thread_test.c15
2 files changed, 14 insertions, 13 deletions
diff --git a/src/tools/fsync/test_fsync.c b/src/tools/fsync/test_fsync.c
index 7c8b4856ea5..42701767b95 100644
--- a/src/tools/fsync/test_fsync.c
+++ b/src/tools/fsync/test_fsync.c
@@ -29,7 +29,7 @@
#endif
#endif
-#define WAL_FILE_SIZE (16 * 1024 * 1024)
+#define WAL_FILE_SIZE (16 * 1024 * 1024)
void die(char *str);
void print_elapse(struct timeval start_t, struct timeval elapse_t);
@@ -41,20 +41,20 @@ main(int argc, char *argv[])
struct timeval elapse_t;
int tmpfile,
i,
- loops=1000;
+ loops = 1000;
char *strout = (char *) malloc(WAL_FILE_SIZE);
char *filename = FSYNC_FILENAME;
- if (argc > 2 && strcmp(argv[1],"-f") == 0)
+ if (argc > 2 && strcmp(argv[1], "-f") == 0)
{
filename = argv[2];
argv += 2;
argc -= 2;
}
-
+
if (argc > 1)
- loops = atoi(argv[1]);
-
+ loops = atoi(argv[1]);
+
for (i = 0; i < WAL_FILE_SIZE; i++)
strout[i] = 'a';
diff --git a/src/tools/thread/thread_test.c b/src/tools/thread/thread_test.c
index 71bdb1ce511..08a027d6e9e 100644
--- a/src/tools/thread/thread_test.c
+++ b/src/tools/thread/thread_test.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.32 2004/08/29 04:13:13 momjian Exp $
+ * $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.33 2004/08/29 05:07:03 momjian Exp $
*
* This program tests to see if your standard libc functions use
* pthread_setspecific()/pthread_getspecific() to be thread-safe.
@@ -64,8 +64,8 @@ main(int argc, char *argv[])
void func_call_1(void);
void func_call_2(void);
-#define TEMP_FILENAME_1 "/tmp/thread_test.1.XXXXXX"
-#define TEMP_FILENAME_2 "/tmp/thread_test.2.XXXXXX"
+#define TEMP_FILENAME_1 "/tmp/thread_test.1.XXXXXX"
+#define TEMP_FILENAME_2 "/tmp/thread_test.2.XXXXXX"
char *temp_filename_1;
char *temp_filename_2;
@@ -105,7 +105,7 @@ main(int argc, char *argv[])
pthread_t thread1,
thread2;
int fd;
-
+
if (argc > 1)
{
fprintf(stderr, "Usage: %s\n", argv[0]);
@@ -117,7 +117,7 @@ main(int argc, char *argv[])
close(1);
dup(5);
#endif
-
+
/* Make temp filenames, might not have strdup() */
temp_filename_1 = malloc(strlen(TEMP_FILENAME_1) + 1);
strcpy(temp_filename_1, TEMP_FILENAME_1);
@@ -128,7 +128,7 @@ main(int argc, char *argv[])
strcpy(temp_filename_2, TEMP_FILENAME_2);
fd = mkstemp(temp_filename_2);
close(fd);
-
+
#if !defined(HAVE_GETADDRINFO) && !defined(HAVE_GETHOSTBYNAME_R)
if (gethostname(myhostname, MAXHOSTNAMELEN) != 0)
{
@@ -363,4 +363,5 @@ func_call_2(void)
pthread_mutex_lock(&init_mutex); /* wait for parent to test */
pthread_mutex_unlock(&init_mutex);
}
-#endif /* !ENABLE_THREAD_SAFETY && !IN_CONFIGURE */
+
+#endif /* !ENABLE_THREAD_SAFETY && !IN_CONFIGURE */