gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r8003 - in GNUnet/src: include util/containers


From: gnunet
Subject: [GNUnet-SVN] r8003 - in GNUnet/src: include util/containers
Date: Sat, 13 Dec 2008 18:01:32 -0700 (MST)

Author: nevans
Date: 2008-12-13 18:01:31 -0700 (Sat, 13 Dec 2008)
New Revision: 8003

Modified:
   GNUnet/src/include/gnunet_util_containers.h
   GNUnet/src/util/containers/multihashmap.c
Log:
pre-commit because i am a waste of life

Modified: GNUnet/src/include/gnunet_util_containers.h
===================================================================
--- GNUnet/src/include/gnunet_util_containers.h 2008-12-14 01:01:16 UTC (rev 
8002)
+++ GNUnet/src/include/gnunet_util_containers.h 2008-12-14 01:01:31 UTC (rev 
8003)
@@ -519,7 +519,8 @@
  * worst case time of N, so it's not efficient in any way
  * shape or form!!!!.
  */
-void * GNUNET_multi_hash_map_get_random (const struct GNUNET_MultiHashMap 
*map);
+void *GNUNET_multi_hash_map_get_random (const struct GNUNET_MultiHashMap
+                                        *map);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {

Modified: GNUnet/src/util/containers/multihashmap.c
===================================================================
--- GNUnet/src/util/containers/multihashmap.c   2008-12-14 01:01:16 UTC (rev 
8002)
+++ GNUnet/src/util/containers/multihashmap.c   2008-12-14 01:01:31 UTC (rev 
8003)
@@ -305,14 +305,13 @@
   e = NULL;
 
   if (map->size == 0)
-       return NULL;
+    return NULL;
 
-  while(e == NULL)
-  {
-       rand = GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK,
-                                                map->size);
-       e = map->map[rand];
-  }
+  while (e == NULL)
+    {
+      rand = GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK, map->size);
+      e = map->map[rand];
+    }
 
   return e->value;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]