summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBruce Momjian1998-06-15 19:30:31 +0000
committerBruce Momjian1998-06-15 19:30:31 +0000
commit6bd323c6b3f65b26273d5efb7ddd0ac04d039546 (patch)
tree6106db4e7512e765ca8c48963fb750cb63fec96f /src/test
parent27db9ecd0b15abca733a99dab3bf9771ad70507d (diff)
Remove un-needed braces around single statements.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/examples/testlibpq.c4
-rw-r--r--src/test/examples/testlibpq4.c4
-rw-r--r--src/test/examples/testlo.c10
-rw-r--r--src/test/examples/testlo2.c6
4 files changed, 2 insertions, 22 deletions
diff --git a/src/test/examples/testlibpq.c b/src/test/examples/testlibpq.c
index 84973df807f..fc75467e475 100644
--- a/src/test/examples/testlibpq.c
+++ b/src/test/examples/testlibpq.c
@@ -102,18 +102,14 @@ main()
/* first, print out the attribute names */
nFields = PQnfields(res);
for (i = 0; i < nFields; i++)
- {
printf("%-15s", PQfname(res, i));
- }
printf("\n\n");
/* next, print out the instances */
for (i = 0; i < PQntuples(res); i++)
{
for (j = 0; j < nFields; j++)
- {
printf("%-15s", PQgetvalue(res, i, j));
- }
printf("\n");
}
diff --git a/src/test/examples/testlibpq4.c b/src/test/examples/testlibpq4.c
index 2cbe622f9b4..e497e7a8fb9 100644
--- a/src/test/examples/testlibpq4.c
+++ b/src/test/examples/testlibpq4.c
@@ -121,18 +121,14 @@ main(int argc, char **argv)
/* first, print out the attribute names */
nFields = PQnfields(res1);
for (i = 0; i < nFields; i++)
- {
printf("%-15s", PQfname(res1, i));
- }
printf("\n\n");
/* next, print out the instances */
for (i = 0; i < PQntuples(res1); i++)
{
for (j = 0; j < nFields; j++)
- {
printf("%-15s", PQgetvalue(res1, i, j));
- }
printf("\n");
}
diff --git a/src/test/examples/testlo.c b/src/test/examples/testlo.c
index 8c18a2463c8..73841d47782 100644
--- a/src/test/examples/testlo.c
+++ b/src/test/examples/testlo.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.8 1998/05/12 21:44:07 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.9 1998/06/15 19:30:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,9 +53,7 @@ importFile(PGconn *conn, char *filename)
*/
lobjId = lo_creat(conn, INV_READ | INV_WRITE);
if (lobjId == 0)
- {
fprintf(stderr, "can't create large object");
- }
lobj_fd = lo_open(conn, lobjId, INV_WRITE);
@@ -66,9 +64,7 @@ importFile(PGconn *conn, char *filename)
{
tmp = lo_write(conn, lobj_fd, buf, nbytes);
if (tmp < nbytes)
- {
fprintf(stderr, "error while reading \"%s\"", filename);
- }
}
close(fd);
@@ -241,9 +237,7 @@ main(int argc, char **argv)
/* lobjOid = importFile(conn, in_filename); */
lobjOid = lo_import(conn, in_filename);
if (lobjOid == 0)
- {
fprintf(stderr, "%s\n", PQerrorMessage(conn));
- }
/*
printf("\tas large object %d.\n", lobjOid);
@@ -257,9 +251,7 @@ main(int argc, char **argv)
printf("exporting large object to file \"%s\" ...\n", out_filename);
/* exportFile(conn, lobjOid, out_filename); */
if (!lo_export(conn, lobjOid, out_filename))
- {
fprintf(stderr, "%s\n", PQerrorMessage(conn));
- }
res = PQexec(conn, "end");
PQclear(res);
diff --git a/src/test/examples/testlo2.c b/src/test/examples/testlo2.c
index 31607ba0f17..b00ee9c5099 100644
--- a/src/test/examples/testlo2.c
+++ b/src/test/examples/testlo2.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.7 1998/05/12 21:44:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.8 1998/06/15 19:30:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,9 +49,7 @@ importFile(PGconn *conn, char *filename)
*/
lobjId = lo_creat(conn, INV_READ | INV_WRITE);
if (lobjId == 0)
- {
fprintf(stderr, "can't create large object");
- }
lobj_fd = lo_open(conn, lobjId, INV_WRITE);
@@ -62,9 +60,7 @@ importFile(PGconn *conn, char *filename)
{
tmp = lo_write(conn, lobj_fd, buf, nbytes);
if (tmp < nbytes)
- {
fprintf(stderr, "error while reading \"%s\"", filename);
- }
}
close(fd);