-fix comments
This commit is contained in:
parent
373fe1c138
commit
6e28917a45
@ -181,13 +181,16 @@ TALER_DB_extract_amount_nbo (PGresult *result,
|
|||||||
|
|
||||||
r_amount_nbo->value = *(uint32_t *) PQgetvalue (result, row, val_num);
|
r_amount_nbo->value = *(uint32_t *) PQgetvalue (result, row, val_num);
|
||||||
r_amount_nbo->fraction = *(uint32_t *) PQgetvalue (result, row, frac_num);
|
r_amount_nbo->fraction = *(uint32_t *) PQgetvalue (result, row, frac_num);
|
||||||
memset (r_amount_nbo->currency, 0, TALER_CURRENCY_LEN);
|
memset (r_amount_nbo->currency,
|
||||||
// FIXME: overflow?
|
0,
|
||||||
len = PQgetlength (result, row, curr_num);
|
TALER_CURRENCY_LEN);
|
||||||
len = GNUNET_MIN (TALER_CURRENCY_LEN, len);
|
len = GNUNET_MIN (TALER_CURRENCY_LEN - 1,
|
||||||
memcpy (r_amount_nbo->currency, PQgetvalue (result, row, curr_num), len);
|
PQgetlength (result, row, curr_num));
|
||||||
r_amount_nbo->currency[TALER_CURRENCY_LEN - 1] = '\0';
|
memcpy (r_amount_nbo->currency,
|
||||||
|
PQgetvalue (result,
|
||||||
|
row,
|
||||||
|
curr_num),
|
||||||
|
len);
|
||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
|
TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* @file include/taler_db_lib.h
|
* @file pq/db_pq.h
|
||||||
* @brief helper functions for DB interactions
|
* @brief helper functions for DB interactions
|
||||||
* @author Sree Harsha Totakura <sreeharsha@totakura.in>
|
* @author Sree Harsha Totakura <sreeharsha@totakura.in>
|
||||||
* @author Florian Dold
|
* @author Florian Dold
|
||||||
@ -186,4 +186,4 @@ TALER_DB_extract_amount (PGresult *result,
|
|||||||
|
|
||||||
#endif /* TALER_DB_LIB_H_ */
|
#endif /* TALER_DB_LIB_H_ */
|
||||||
|
|
||||||
/* end of include/taler_db_lib.h */
|
/* end of db/db_pq.h */
|
||||||
|
Loading…
Reference in New Issue
Block a user