stuff
authorChristian Grothoff <christian@grothoff.org>
Tue, 13 Sep 2011 12:25:52 +0000 (12:25 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 13 Sep 2011 12:25:52 +0000 (12:25 +0000)
src/dht/gnunet-service-dht.c

index e815ee200c0db0008721658a52c8a40939acc65b..23192b86b8e574b6dc62485eff6598affcf4190a 100644 (file)
@@ -913,6 +913,7 @@ decrease_max_send_delay (struct GNUNET_TIME_Relative max_time)
   }
 }
 
+
 /**
  * Find the maximum send time of the recently sent values.
  *
@@ -940,24 +941,25 @@ get_max_send_delay ()
   return max_time;
 }
 
+
 static void
 increment_stats (const char *value)
 {
-  if (stats != NULL)
-  {
-    GNUNET_STATISTICS_update (stats, value, 1, GNUNET_NO);
-  }
+  if (stats == NULL)
+    return;
+  GNUNET_STATISTICS_update (stats, value, 1, GNUNET_NO);  
 }
 
+
 static void
 decrement_stats (const char *value)
 {
-  if (stats != NULL)
-  {
-    GNUNET_STATISTICS_update (stats, value, -1, GNUNET_NO);
-  }
+  if (stats == NULL)
+    return;
+  GNUNET_STATISTICS_update (stats, value, -1, GNUNET_NO);  
 }
 
+
 /**
  *  Try to send another message from our core send list
  */
@@ -999,6 +1001,7 @@ try_core_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
 }
 
+
 /**
  * Function called to send a request out to another peer.
  * Called both for locally initiated requests and those
@@ -1218,6 +1221,7 @@ distance (const GNUNET_HashCode * target, const GNUNET_HashCode * have)
   return msb | lsb;
 }
 
+
 /**
  * Return a number that is larger the closer the
  * "have" GNUNET_hash code is to the "target".
@@ -2338,6 +2342,7 @@ handle_dht_get (const struct GNUNET_MessageHeader *msg,
   return results;
 }
 
+
 static void
 remove_recent_find_peer (void *cls,
                          const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -2350,6 +2355,7 @@ remove_recent_find_peer (void *cls,
   GNUNET_free (key);
 }
 
+
 /**
  * Server handler for initiating local dht find peer requests
  *