mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
weakrng.h: use COCCI to hide a macro coccinelle cannot parse.
This commit is contained in:
parent
d1cdb1a24e
commit
fb4b6b6436
@ -19,8 +19,11 @@ typedef struct tor_weak_rng_t {
|
|||||||
uint32_t state;
|
uint32_t state;
|
||||||
} tor_weak_rng_t;
|
} tor_weak_rng_t;
|
||||||
|
|
||||||
|
#ifndef COCCI
|
||||||
#define TOR_WEAK_RNG_INIT {383745623}
|
#define TOR_WEAK_RNG_INIT {383745623}
|
||||||
|
#endif
|
||||||
#define TOR_WEAK_RANDOM_MAX (INT_MAX)
|
#define TOR_WEAK_RANDOM_MAX (INT_MAX)
|
||||||
|
|
||||||
void tor_init_weak_random(tor_weak_rng_t *weak_rng, unsigned seed);
|
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(tor_weak_rng_t *weak_rng);
|
||||||
int32_t tor_weak_random_range(tor_weak_rng_t *rng, int32_t top);
|
int32_t tor_weak_random_range(tor_weak_rng_t *rng, int32_t top);
|
||||||
|
Loading…
Reference in New Issue
Block a user