From c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 5 Oct 2019 15:09:28 +0200 Subject: global reindent, now with uncrustify hook enabled --- src/pq/pq_prepare.c | 58 ++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'src/pq/pq_prepare.c') diff --git a/src/pq/pq_prepare.c b/src/pq/pq_prepare.c index 9899b65bb..0facf100f 100644 --- a/src/pq/pq_prepare.c +++ b/src/pq/pq_prepare.c @@ -36,9 +36,9 @@ * @return initialized struct */ struct GNUNET_PQ_PreparedStatement -GNUNET_PQ_make_prepare(const char *name, - const char *sql, - unsigned int num_args) +GNUNET_PQ_make_prepare (const char *name, + const char *sql, + unsigned int num_args) { struct GNUNET_PQ_PreparedStatement ps = { .name = name, @@ -60,36 +60,36 @@ GNUNET_PQ_make_prepare(const char *name, * #GNUNET_SYSERR on error */ int -GNUNET_PQ_prepare_statements(PGconn *connection, - const struct GNUNET_PQ_PreparedStatement *ps) +GNUNET_PQ_prepare_statements (PGconn *connection, + const struct GNUNET_PQ_PreparedStatement *ps) { for (unsigned int i = 0; NULL != ps[i].name; i++) - { - PGresult *ret; + { + PGresult *ret; - GNUNET_log_from(GNUNET_ERROR_TYPE_DEBUG, - "pq", - "Preparing SQL statement `%s' as `%s'\n", - ps[i].sql, - ps[i].name); - ret = PQprepare(connection, - ps[i].name, - ps[i].sql, - ps[i].num_arguments, - NULL); - if (PGRES_COMMAND_OK != PQresultStatus(ret)) - { - GNUNET_log_from(GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, - "pq", - _("PQprepare (`%s' as `%s') failed with error: %s\n"), - ps[i].sql, - ps[i].name, - PQerrorMessage(connection)); - PQclear(ret); - return GNUNET_SYSERR; - } - PQclear(ret); + GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, + "pq", + "Preparing SQL statement `%s' as `%s'\n", + ps[i].sql, + ps[i].name); + ret = PQprepare (connection, + ps[i].name, + ps[i].sql, + ps[i].num_arguments, + NULL); + if (PGRES_COMMAND_OK != PQresultStatus (ret)) + { + GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, + "pq", + _ ("PQprepare (`%s' as `%s') failed with error: %s\n"), + ps[i].sql, + ps[i].name, + PQerrorMessage (connection)); + PQclear (ret); + return GNUNET_SYSERR; } + PQclear (ret); + } return GNUNET_OK; } -- cgit v1.2.3