diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-08-25 16:18:24 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-08-25 16:18:24 +0200 |
commit | eb559970846f0fa27f1f25c482cd07210a56f4b1 (patch) | |
tree | 8526637825e520e1420b17515934ced794a33c01 /src/pq/test_pq.c | |
parent | 3742239c13001433eeade439a0e0490f07351c43 (diff) |
re-format code
Diffstat (limited to 'src/pq/test_pq.c')
-rw-r--r-- | src/pq/test_pq.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/pq/test_pq.c b/src/pq/test_pq.c index 471326f02..e9d0f3e16 100644 --- a/src/pq/test_pq.c +++ b/src/pq/test_pq.c @@ -91,7 +91,7 @@ run_queries (PGconn *conn) TALER_string_to_amount ("EUR:5.5", &hamount)); TALER_amount_hton (&namount, - &hamount); + &hamount); GNUNET_assert (GNUNET_OK == TALER_string_to_amount ("EUR:4.4", &hamount)); @@ -113,8 +113,8 @@ run_queries (PGconn *conn) if (PGRES_COMMAND_OK != PQresultStatus (result)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Database failure: %s\n", - PQresultErrorMessage (result)); + "Database failure: %s\n", + PQresultErrorMessage (result)); PQclear (result); return 1; } @@ -146,19 +146,19 @@ run_queries (PGconn *conn) }; ret = GNUNET_PQ_extract_result (result, - results_select, - 0); + results_select, + 0); GNUNET_break (0 == - TALER_amount_cmp (&hamount, - &hamount2)); + TALER_amount_cmp (&hamount, + &hamount2)); GNUNET_assert (GNUNET_OK == TALER_string_to_amount ("EUR:5.5", &hamount)); TALER_amount_ntoh (&hamount2, - &namount2); + &namount2); GNUNET_break (0 == - TALER_amount_cmp (&hamount, - &hamount2)); + TALER_amount_cmp (&hamount, + &hamount2)); GNUNET_break (42 == json_integer_value (json_object_get (json2, "foo"))); GNUNET_PQ_cleanup_result (results_select); @@ -173,8 +173,8 @@ run_queries (PGconn *conn) int -main(int argc, - const char *const argv[]) +main (int argc, + const char *const argv[]) { PGconn *conn; PGresult *result; @@ -187,21 +187,21 @@ main(int argc, if (CONNECTION_OK != PQstatus (conn)) { fprintf (stderr, - "Cannot run test, database connection failed: %s\n", - PQerrorMessage (conn)); + "Cannot run test, database connection failed: %s\n", + PQerrorMessage (conn)); GNUNET_break (0); PQfinish (conn); return 0; /* We ignore this type of error... */ } result = PQexec (conn, - "CREATE TEMPORARY TABLE IF NOT EXISTS test_pq (" - " hamount_val INT8 NOT NULL" - ",hamount_frac INT4 NOT NULL" - ",namount_val INT8 NOT NULL" - ",namount_frac INT4 NOT NULL" - ",json VARCHAR NOT NULL" - ")"); + "CREATE TEMPORARY TABLE IF NOT EXISTS test_pq (" + " hamount_val INT8 NOT NULL" + ",hamount_frac INT4 NOT NULL" + ",namount_val INT8 NOT NULL" + ",namount_frac INT4 NOT NULL" + ",json VARCHAR NOT NULL" + ")"); if (PGRES_COMMAND_OK != PQresultStatus (result)) { fprintf (stderr, |