aboutsummaryrefslogtreecommitdiff
path: root/src/nse/gnunet-service-nse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nse/gnunet-service-nse.c')
-rw-r--r--src/nse/gnunet-service-nse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 3db330204..7bf186e83 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -661,7 +661,7 @@ transmit_ready (void *cls,
661 peer_entry->last_transmitted_size = 661 peer_entry->last_transmitted_size =
662 ntohl(size_estimate_messages[idx].matching_bits); 662 ntohl(size_estimate_messages[idx].matching_bits);
663#endif 663#endif
664 memcpy (buf, &size_estimate_messages[idx], 664 GNUNET_memcpy (buf, &size_estimate_messages[idx],
665 sizeof (struct GNUNET_NSE_FloodMessage)); 665 sizeof (struct GNUNET_NSE_FloodMessage));
666 return sizeof (struct GNUNET_NSE_FloodMessage); 666 return sizeof (struct GNUNET_NSE_FloodMessage);
667} 667}
@@ -880,8 +880,8 @@ check_proof_of_work (const struct GNUNET_CRYPTO_EddsaPublicKey *pkey,
880 sizeof (val)] GNUNET_ALIGN; 880 sizeof (val)] GNUNET_ALIGN;
881 struct GNUNET_HashCode result; 881 struct GNUNET_HashCode result;
882 882
883 memcpy (buf, &val, sizeof (val)); 883 GNUNET_memcpy (buf, &val, sizeof (val));
884 memcpy (&buf[sizeof (val)], pkey, 884 GNUNET_memcpy (&buf[sizeof (val)], pkey,
885 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)); 885 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey));
886 pow_hash (buf, sizeof (buf), &result); 886 pow_hash (buf, sizeof (buf), &result);
887 return (count_leading_zeroes (&result) >= 887 return (count_leading_zeroes (&result) >=
@@ -926,13 +926,13 @@ find_proof (void *cls)
926 unsigned int i; 926 unsigned int i;
927 927
928 proof_task = NULL; 928 proof_task = NULL;
929 memcpy (&buf[sizeof (uint64_t)], &my_identity, 929 GNUNET_memcpy (&buf[sizeof (uint64_t)], &my_identity,
930 sizeof (struct GNUNET_PeerIdentity)); 930 sizeof (struct GNUNET_PeerIdentity));
931 i = 0; 931 i = 0;
932 counter = my_proof; 932 counter = my_proof;
933 while ((counter != UINT64_MAX) && (i < ROUND_SIZE)) 933 while ((counter != UINT64_MAX) && (i < ROUND_SIZE))
934 { 934 {
935 memcpy (buf, &counter, sizeof (uint64_t)); 935 GNUNET_memcpy (buf, &counter, sizeof (uint64_t));
936 pow_hash (buf, sizeof (buf), &result); 936 pow_hash (buf, sizeof (buf), &result);
937 if (nse_work_required <= count_leading_zeroes (&result)) 937 if (nse_work_required <= count_leading_zeroes (&result))
938 { 938 {