aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/gnunet-service-namestore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/gnunet-service-namestore.c')
-rw-r--r--src/namestore/gnunet-service-namestore.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 45be0fe75..d2a09087e 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -553,9 +553,8 @@ cache_nick (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
553 (oldest->last_used.abs_value_us > 553 (oldest->last_used.abs_value_us >
554 pos->last_used.abs_value_us) ) 554 pos->last_used.abs_value_us) )
555 oldest = pos; 555 oldest = pos;
556 if (0 == memcmp (zone, 556 if (0 == GNUNET_memcmp (zone,
557 &pos->zone, 557 &pos->zone))
558 sizeof (*zone)))
559 { 558 {
560 oldest = pos; 559 oldest = pos;
561 break; 560 break;
@@ -592,9 +591,8 @@ get_nick_record (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone)
592 { 591 {
593 struct NickCache *pos = &nick_cache[i]; 592 struct NickCache *pos = &nick_cache[i];
594 if ( (NULL != pos->rd) && 593 if ( (NULL != pos->rd) &&
595 (0 == memcmp (zone, 594 (0 == GNUNET_memcmp (zone,
596 &pos->zone, 595 &pos->zone)) )
597 sizeof (*zone))) )
598 { 596 {
599 nick = GNUNET_malloc (sizeof (*nick) + 597 nick = GNUNET_malloc (sizeof (*nick) +
600 pos->rd->data_size); 598 pos->rd->data_size);
@@ -1082,12 +1080,10 @@ continue_store_activity (struct StoreActivity *sa)
1082 NULL != zm; 1080 NULL != zm;
1083 zm = sa->zm_pos) 1081 zm = sa->zm_pos)
1084 { 1082 {
1085 if ( (0 != memcmp (&rp_msg->private_key, 1083 if ( (0 != GNUNET_memcmp (&rp_msg->private_key,
1086 &zm->zone, 1084 &zm->zone)) &&
1087 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) && 1085 (0 != GNUNET_memcmp (&zm->zone,
1088 (0 != memcmp (&zm->zone, 1086 &zero)) )
1089 &zero,
1090 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) )
1091 { 1087 {
1092 sa->zm_pos = zm->next; /* not interesting to this monitor */ 1088 sa->zm_pos = zm->next; /* not interesting to this monitor */
1093 continue; 1089 continue;
@@ -1921,9 +1917,7 @@ run_zone_iteration_round (struct ZoneIteration *zi,
1921 start = GNUNET_TIME_absolute_get (); 1917 start = GNUNET_TIME_absolute_get ();
1922 GNUNET_break (GNUNET_SYSERR != 1918 GNUNET_break (GNUNET_SYSERR !=
1923 GSN_database->iterate_records (GSN_database->cls, 1919 GSN_database->iterate_records (GSN_database->cls,
1924 (0 == memcmp (&zi->zone, 1920 (0 == GNUNET_is_zero (&zi->zone))
1925 &zero,
1926 sizeof (zero)))
1927 ? NULL 1921 ? NULL
1928 : &zi->zone, 1922 : &zi->zone,
1929 zi->seq, 1923 zi->seq,
@@ -2220,9 +2214,7 @@ monitor_iteration_next (void *cls)
2220 else 2214 else
2221 zm->iteration_cnt = zm->limit; /* use it all */ 2215 zm->iteration_cnt = zm->limit; /* use it all */
2222 ret = GSN_database->iterate_records (GSN_database->cls, 2216 ret = GSN_database->iterate_records (GSN_database->cls,
2223 (0 == memcmp (&zm->zone, 2217 (0 == GNUNET_is_zero (&zm->zone))
2224 &zero,
2225 sizeof (zero)))
2226 ? NULL 2218 ? NULL
2227 : &zm->zone, 2219 : &zm->zone,
2228 zm->seq, 2220 zm->seq,