refactor link_bc() for GNUnet_memcmp

This commit is contained in:
ng0 2019-04-23 17:58:38 +00:00
parent 9c515d218b
commit ddea1bf407
No known key found for this signature in database
GPG Key ID: E22F9BBFEE348588

View File

@ -591,9 +591,8 @@ link_cb (void *cls,
/* check that the coins match */
for (unsigned int i=0;i<num_coins;i++)
for (unsigned int j=i+1;j<num_coins;j++)
if (0 == memcmp
(&coin_privs[i], &coin_privs[j],
sizeof (struct TALER_CoinSpendPrivateKeyP)))
if (0 == GNUNET_memcmp
(&coin_privs[i], &coin_privs[j]))
GNUNET_break (0);
/* Note: coins might be legitimately permutated in here... */
found = 0;