diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-06-04 10:35:37 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-06-04 10:35:37 +0200 |
commit | 8a93e84d7142aa5d5826a6b51cb19c093f71ca1b (patch) | |
tree | 51da23d50b0025e0df4bb1e3d0bbb0d9a7c35f05 /src | |
parent | 1de6f78a1d4546962e620b5ed93deb9750d73fef (diff) | |
download | exchange-8a93e84d7142aa5d5826a6b51cb19c093f71ca1b.tar.xz |
use const, annotate in/out argument, avoid postgres_-prefix for non-exported functions
Diffstat (limited to 'src')
-rw-r--r-- | src/include/taler_mintdb_plugin.h | 4 | ||||
-rw-r--r-- | src/include/taler_signatures.h | 2 | ||||
-rw-r--r-- | src/mintdb/plugin_mintdb_postgres.c | 22 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_mintdb_plugin.h index 054a19177..d7f8e6b4f 100644 --- a/src/include/taler_mintdb_plugin.h +++ b/src/include/taler_mintdb_plugin.h @@ -664,7 +664,7 @@ struct TALER_MINTDB_Plugin * * @param cls the @e cls of this struct with the plugin-specific state * @param sesssion connection to use - * @param dki the denomination key information + * @param dki the denomination key information (#3823) * @return #GNUNET_OK on success; #GNUNET_SYSERR on failure */ int @@ -680,7 +680,7 @@ struct TALER_MINTDB_Plugin * * @param cls the @e cls of this struct with the plugin-specific state * @param db the database connection handle - * @param reserve the reserve data. The public key of the reserve should be set + * @param[in,out] reserve the reserve data. The public key of the reserve should be set * in this structure; it is used to query the database. The balance * and expiration are then filled accordingly. * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index bc34c32e9..f1d271955 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -587,7 +587,7 @@ struct TALER_DenominationKeyValidityPS /** * Hash code of the denomination public key. (Used to avoid having - * the variable-size RSA key this struct.) + * the variable-size RSA key in this struct.) */ struct GNUNET_HashCode denom_hash; diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c index 2a43c784b..1cc2cfe53 100644 --- a/src/mintdb/plugin_mintdb_postgres.c +++ b/src/mintdb/plugin_mintdb_postgres.c @@ -1017,8 +1017,8 @@ postgres_insert_denomination (void *cls, * * @param cls the `struct PostgresClosure` with the plugin-specific state * @param session the database connection handle - * @param reserve the reserve data. The public key of the reserve should be set - * in this structure; it is used to query the database. The balance + * @param[in,out] reserve the reserve data. The public key of the reserve should be + * set in this structure; it is used to query the database. The balance * and expiration are then filled accordingly. * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure */ @@ -1075,9 +1075,9 @@ postgres_reserve_get (void *cls, * @return #GNUNET_OK upon successful update; #GNUNET_SYSERR upon any error */ static int -postgres_reserves_update (void *cls, - struct TALER_MINTDB_Session *session, - struct TALER_MINTDB_Reserve *reserve) +reserves_update (void *cls, + struct TALER_MINTDB_Session *session, + const struct TALER_MINTDB_Reserve *reserve) { PGresult *result; int ret; @@ -1228,9 +1228,9 @@ postgres_reserves_in_insert (void *cls, PQclear (result); result = NULL; if ( (GNUNET_YES == reserve_exists) && - (GNUNET_OK != postgres_reserves_update (cls, - session, - &updated_reserve)) ) + (GNUNET_OK != reserves_update (cls, + session, + &updated_reserve)) ) goto rollback; if (GNUNET_OK != postgres_commit (cls, session)) @@ -1370,9 +1370,9 @@ postgres_insert_collectable_blindcoin (void *cls, &reserve.balance, &withdraw)) goto rollback; - if (GNUNET_OK != postgres_reserves_update (cls, - session, - &reserve)) + if (GNUNET_OK != reserves_update (cls, + session, + &reserve)) goto rollback; if (GNUNET_OK == postgres_commit (cls, session)) |