summaryrefslogtreecommitdiff
path: root/src/pq/pq_prepare.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-05 15:09:28 +0200
committerChristian Grothoff <christian@grothoff.org>2019-10-05 15:09:28 +0200
commitc4e9ba925ffd758aaa3feee2ccfc0b76f26fe207 (patch)
treecac3ce030d77b4cbe7c7dc62ed58cfe6d24f73e1 /src/pq/pq_prepare.c
parentfbb71d527c7d6babf269a8fefce1db291b9f7068 (diff)
global reindent, now with uncrustify hook enabled
Diffstat (limited to 'src/pq/pq_prepare.c')
-rw-r--r--src/pq/pq_prepare.c58
1 files changed, 29 insertions, 29 deletions
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;
}