use const, annotate in/out argument, avoid postgres_-prefix for non-exported functions

This commit is contained in:
Christian Grothoff 2015-06-04 10:35:37 +02:00
parent 1de6f78a1d
commit 8a93e84d71
3 changed files with 14 additions and 14 deletions

View File

@ -664,7 +664,7 @@ struct TALER_MINTDB_Plugin
* *
* @param cls the @e cls of this struct with the plugin-specific state * @param cls the @e cls of this struct with the plugin-specific state
* @param sesssion connection to use * @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 * @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
*/ */
int int
@ -680,7 +680,7 @@ struct TALER_MINTDB_Plugin
* *
* @param cls the @e cls of this struct with the plugin-specific state * @param cls the @e cls of this struct with the plugin-specific state
* @param db the database connection handle * @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 * in this structure; it is used to query the database. The balance
* and expiration are then filled accordingly. * and expiration are then filled accordingly.
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure

View File

@ -587,7 +587,7 @@ struct TALER_DenominationKeyValidityPS
/** /**
* Hash code of the denomination public key. (Used to avoid having * 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; struct GNUNET_HashCode denom_hash;

View File

@ -1017,8 +1017,8 @@ postgres_insert_denomination (void *cls,
* *
* @param cls the `struct PostgresClosure` with the plugin-specific state * @param cls the `struct PostgresClosure` with the plugin-specific state
* @param session the database connection handle * @param session 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
* in this structure; it is used to query the database. The balance * set in this structure; it is used to query the database. The balance
* and expiration are then filled accordingly. * and expiration are then filled accordingly.
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure * @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 * @return #GNUNET_OK upon successful update; #GNUNET_SYSERR upon any error
*/ */
static int static int
postgres_reserves_update (void *cls, reserves_update (void *cls,
struct TALER_MINTDB_Session *session, struct TALER_MINTDB_Session *session,
struct TALER_MINTDB_Reserve *reserve) const struct TALER_MINTDB_Reserve *reserve)
{ {
PGresult *result; PGresult *result;
int ret; int ret;
@ -1228,7 +1228,7 @@ postgres_reserves_in_insert (void *cls,
PQclear (result); PQclear (result);
result = NULL; result = NULL;
if ( (GNUNET_YES == reserve_exists) && if ( (GNUNET_YES == reserve_exists) &&
(GNUNET_OK != postgres_reserves_update (cls, (GNUNET_OK != reserves_update (cls,
session, session,
&updated_reserve)) ) &updated_reserve)) )
goto rollback; goto rollback;
@ -1370,7 +1370,7 @@ postgres_insert_collectable_blindcoin (void *cls,
&reserve.balance, &reserve.balance,
&withdraw)) &withdraw))
goto rollback; goto rollback;
if (GNUNET_OK != postgres_reserves_update (cls, if (GNUNET_OK != reserves_update (cls,
session, session,
&reserve)) &reserve))
goto rollback; goto rollback;