fix
authorChristian Grothoff <christian@grothoff.org>
Tue, 27 Sep 2011 14:46:14 +0000 (14:46 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 27 Sep 2011 14:46:14 +0000 (14:46 +0000)
src/dht/dht_api.c
src/dht/gnunet-service-dht_neighbours.c

index 88ed4ed9d4db05f07f6f80cba8653adebc41e286..2a14b216f1a7f6d32bb7c23246400cb37d71fe53 100644 (file)
@@ -425,15 +425,15 @@ process_reply (void *cls, const GNUNET_HashCode * key, void *value)
   struct GNUNET_DHT_RouteHandle *rh = value;
   const struct GNUNET_MessageHeader *enc_msg;
   size_t enc_size;
-  uint64_t uid;
   const struct GNUNET_PeerIdentity **outgoing_path;
   const struct GNUNET_PeerIdentity *pos;
   uint32_t outgoing_path_length;
   unsigned int i;
   char *path_offset;
+#if HAVE_UID_FOR_TESTING
+  uint64_t uid;
 
   uid = GNUNET_ntohll (dht_msg->unique_id);
-#if HAVE_UID_FOR_TESTING
   if (uid != rh->uid)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
index 8cbf918d2d5a70eab7a6fa80132af8862769b4f2..96a43c23fb91ce5eaedcbc6962695db879cde579 100644 (file)
@@ -923,13 +923,11 @@ am_closest_peer (const GNUNET_HashCode *key,
   int bucket_num;
   int count;
   struct PeerInfo *pos;
-  unsigned int my_distance;
 
   if (0 == memcmp (&my_identity.hashPubKey, key, sizeof (GNUNET_HashCode)))
     return GNUNET_YES;
   bucket_num = find_bucket (key);
   bits = GNUNET_CRYPTO_hash_matching_bits (&my_identity.hashPubKey, key);
-  my_distance = get_distance (&my_identity.hashPubKey, key);
   pos = k_buckets[bucket_num].head;
   count = 0;
   while ((pos != NULL) && (count < bucket_size))