From 1e08c25f73d38b10679f1bc84861ffb498884cef Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 26 Oct 2021 14:10:35 +0300 Subject: Normalize C comments in tests source code --- TODO | 11 ----------- libpq/tests/conninfo/driver.c | 21 +++++++-------------- libpq/tests/conninfo/postgres_fe.h | 3 +-- 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 #undef main -/* - * Enable assertions. +/* Enable assertions. */ #ifdef NDEBUG # undef NDEBUG @@ -21,8 +19,7 @@ #include #include /* 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 -- cgit v1.1