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 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

View File

@ -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;

View File

@ -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))