summaryrefslogtreecommitdiff
path: root/src/exchangedb/bench_db.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/bench_db.c')
-rw-r--r--src/exchangedb/bench_db.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/exchangedb/bench_db.c b/src/exchangedb/bench_db.c
index a8dbfbfa5..302d23062 100644
--- a/src/exchangedb/bench_db.c
+++ b/src/exchangedb/bench_db.c
@@ -51,32 +51,28 @@ prepare (struct GNUNET_PQ_Context *conn)
"(hc"
",expiration_date"
") VALUES "
- "($1, $2);",
- 2),
+ "($1, $2);"),
/* Used in #postgres_iterate_denomination_info() */
GNUNET_PQ_make_prepare (
"bm_select",
"SELECT"
" expiration_date"
" FROM benchmap"
- " WHERE hc=$1;",
- 1),
+ " WHERE hc=$1;"),
GNUNET_PQ_make_prepare (
"bhm_insert",
"INSERT INTO benchhmap "
"(hc"
",expiration_date"
") VALUES "
- "($1, $2);",
- 2),
+ "($1, $2);"),
/* Used in #postgres_iterate_denomination_info() */
GNUNET_PQ_make_prepare (
"bhm_select",
"SELECT"
" expiration_date"
" FROM benchhmap"
- " WHERE hc=$1;",
- 1),
+ " WHERE hc=$1;"),
GNUNET_PQ_make_prepare (
"bem_insert",
"INSERT INTO benchemap "
@@ -84,16 +80,14 @@ prepare (struct GNUNET_PQ_Context *conn)
",ihc"
",expiration_date"
") VALUES "
- "($1, $2, $3);",
- 3),
+ "($1, $2, $3);"),
/* Used in #postgres_iterate_denomination_info() */
GNUNET_PQ_make_prepare (
"bem_select",
"SELECT"
" expiration_date"
" FROM benchemap"
- " WHERE ihc=$1 AND hc=$2;",
- 2),
+ " WHERE ihc=$1 AND hc=$2;"),
GNUNET_PQ_PREPARED_STATEMENT_END
};
enum GNUNET_GenericReturnValue ret;
@@ -175,9 +169,9 @@ bem_insert (struct GNUNET_PQ_Context *conn,
GNUNET_CRYPTO_hash (&b,
sizeof (b),
&hc);
- memcpy (&ihc,
- &hc,
- sizeof (ihc));
+ GNUNET_memcpy (&ihc,
+ &hc,
+ sizeof (ihc));
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&hc),
@@ -271,9 +265,9 @@ bem_select (struct GNUNET_PQ_Context *conn,
GNUNET_CRYPTO_hash (&b,
sizeof (b),
&hc);
- memcpy (&ihc,
- &hc,
- sizeof (ihc));
+ GNUNET_memcpy (&ihc,
+ &hc,
+ sizeof (ihc));
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint32 (&ihc),