[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5968 - GNUnet/src/applications/dht/module
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5968 - GNUnet/src/applications/dht/module |
Date: |
Wed, 19 Dec 2007 11:01:28 -0700 (MST) |
Author: grothoff
Date: 2007-12-19 11:01:28 -0700 (Wed, 19 Dec 2007)
New Revision: 5968
Modified:
GNUnet/src/applications/dht/module/routing.c
Log:
use our own PRNG for portability
Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c 2007-12-19 17:55:42 UTC
(rev 5967)
+++ GNUnet/src/applications/dht/module/routing.c 2007-12-19 18:01:28 UTC
(rev 5968)
@@ -233,7 +233,8 @@
target_value = 0;
while (target_value < target_count)
target_value++;
- if ((target_count + 1 - target_value) > drand48 ())
+#define LARGE_INT 0xFFFFFF
+ if ((target_count + 1 - target_value) >
GNUNET_random_u32(GNUNET_RANDOM_QUALITY_WEAK, LARGE_INT) / ((double) LARGE_INT))
target_value++;
return target_value;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5968 - GNUnet/src/applications/dht/module,
gnunet <=