summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-10-26 14:10:35 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-10-27 10:46:38 +0300
commit1e08c25f73d38b10679f1bc84861ffb498884cef (patch)
tree1a74a5bf1aa5c7d8f805a1fb56d82529be1fea8a
parent67c597e603867190561a640f58d8430aa79154f5 (diff)
Normalize C comments in tests source code
-rw-r--r--TODO11
-rw-r--r--libpq/tests/conninfo/driver.c21
-rw-r--r--libpq/tests/conninfo/postgres_fe.h3
3 files changed, 8 insertions, 27 deletions
diff --git a/TODO b/TODO
index 3404564..7f10a42 100644
--- a/TODO
+++ b/TODO
@@ -3,17 +3,6 @@ On the revision:
- Make the .map and .def files prerequisites of the libs type target and only
on the respective OSes. Also try to generate them on the fly.
-- Normalize C comments in the tests source code replacing:
-
- /*
- * ...
- */
-
- with
-
- /* ...
- */
-
On the release:
- Use legal{} target type for legal documentation (LICENSE, AUTHORS, etc).
diff --git a/libpq/tests/conninfo/driver.c b/libpq/tests/conninfo/driver.c
index 2107ac9..a924b0b 100644
--- a/libpq/tests/conninfo/driver.c
+++ b/libpq/tests/conninfo/driver.c
@@ -2,16 +2,14 @@
* license : PostgreSQL License; see accompanying COPYRIGHT file
*/
-/*
- * Include the upstream package test and rename it's main() function to test()
+/* Include the upstream package test and rename it's main() function to test()
* (see below for details).
*/
#define main test
#include <uri-regress.c>
#undef main
-/*
- * Enable assertions.
+/* Enable assertions.
*/
#ifdef NDEBUG
# undef NDEBUG
@@ -21,8 +19,7 @@
#include <assert.h>
#include <string.h> /* strlen() */
-/*
- * Usage: argv[0]
+/* Usage: argv[0]
*
* Read connection info strings from STDIN and call upstream test main()
* function for each of them. The function prints the parsed connection info to
@@ -37,13 +34,11 @@ main (int argc, char* argv[])
while (fgets (s, sizeof(s), stdin) != NULL)
{
- /*
- * Print the conninfo string that will be tested.
+ /* Print the conninfo string that will be tested.
*/
printf ("trying %s", s);
- /*
- * Strip the newline character and make sure it is printed to stdout.
+ /* Strip the newline character and make sure it is printed to stdout.
*/
size_t n = strlen (s);
if (n != 0 && s[n - 1] == '\n')
@@ -51,14 +46,12 @@ main (int argc, char* argv[])
else
printf ("\n");
- /*
- * Make sure the output make sense if stderr is redirected to stdout (and
+ /* Make sure the output make sense if stderr is redirected to stdout (and
* vice versa).
*/
fflush (stdout);
- /*
- * Run the test.
+ /* Run the test.
*
* Note that we need to print the trailing newline character ourselves.
*/
diff --git a/libpq/tests/conninfo/postgres_fe.h b/libpq/tests/conninfo/postgres_fe.h
index d22d43c..c1e94e1 100644
--- a/libpq/tests/conninfo/postgres_fe.h
+++ b/libpq/tests/conninfo/postgres_fe.h
@@ -2,8 +2,7 @@
* license : PostgreSQL License; see accompanying COPYRIGHT file
*/
-/*
- * The upstream's uri-regress.c includes src/include/postgres_fe.h that is
+/* The upstream's uri-regress.c includes src/include/postgres_fe.h that is
* located in libpq/include/ in our source tree. This file is not installed,
* so to keep the test as a subproject and be able to test against the
* installed libpq library we replace it with the header stub, containing the