Skip to content

Commit

Permalink
init value to zero in balance_status
Browse files Browse the repository at this point in the history
  • Loading branch information
haipome committed Aug 31, 2017
1 parent e4c2c09 commit e61d626
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion matchengine/me_balance.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,11 @@ mpd_t *balance_total(uint32_t user_id, const char *asset)

int balance_status(const char *asset, mpd_t *total, size_t *available_count, mpd_t *available, size_t *freeze_count, mpd_t *freeze)
{
*available_count = 0;
*freeze_count = 0;
*available_count = 0;
mpd_copy(total, mpd_zero, &mpd_ctx);
mpd_copy(freeze, mpd_zero, &mpd_ctx);
mpd_copy(available, mpd_zero, &mpd_ctx);

dict_entry *entry;
dict_iterator *iter = dict_get_iterator(dict_balance);
Expand Down

0 comments on commit e61d626

Please sign in to comment.