]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
weakrng.h: use COCCI to hide a macro coccinelle cannot parse.
authorNick Mathewson <nickm@torproject.org>
Wed, 9 Oct 2019 16:59:22 +0000 (12:59 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 22 Oct 2019 13:32:13 +0000 (09:32 -0400)
src/lib/intmath/weakrng.h

index 40941e59b2431271f900714b5f4edf384957f59e..d583c8f79b9771a98611ecdf71d8695b0d295f0b 100644 (file)
@@ -19,8 +19,11 @@ typedef struct tor_weak_rng_t {
   uint32_t state;
 } tor_weak_rng_t;
 
+#ifndef COCCI
 #define TOR_WEAK_RNG_INIT {383745623}
+#endif
 #define TOR_WEAK_RANDOM_MAX (INT_MAX)
+
 void tor_init_weak_random(tor_weak_rng_t *weak_rng, unsigned seed);
 int32_t tor_weak_random(tor_weak_rng_t *weak_rng);
 int32_t tor_weak_random_range(tor_weak_rng_t *rng, int32_t top);