mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 09:19:53 +00:00
PPP, magic, build-out useless code when LWIP_RAND is defined
This commit is contained in:
parent
0f3fbb267b
commit
c4a1cad81b
@ -195,7 +195,9 @@ u32_t magic(void) {
|
|||||||
/*****************************/
|
/*****************************/
|
||||||
/*** LOCAL DATA STRUCTURES ***/
|
/*** LOCAL DATA STRUCTURES ***/
|
||||||
/*****************************/
|
/*****************************/
|
||||||
|
#ifndef LWIP_RAND
|
||||||
static int magic_randomized; /* Set when truely randomized. */
|
static int magic_randomized; /* Set when truely randomized. */
|
||||||
|
#endif /* LWIP_RAND */
|
||||||
static u32_t magic_randomseed; /* Seed used for random number generation. */
|
static u32_t magic_randomseed; /* Seed used for random number generation. */
|
||||||
|
|
||||||
|
|
||||||
@ -235,14 +237,18 @@ void magic_init(void) {
|
|||||||
* bits.
|
* bits.
|
||||||
*/
|
*/
|
||||||
void magic_randomize(void) {
|
void magic_randomize(void) {
|
||||||
|
#ifndef LWIP_RAND
|
||||||
if (!magic_randomized) {
|
if (!magic_randomized) {
|
||||||
magic_randomized = !0;
|
magic_randomized = !0;
|
||||||
magic_init();
|
magic_init();
|
||||||
/* The initialization function also updates the seed. */
|
/* The initialization function also updates the seed. */
|
||||||
} else {
|
} else {
|
||||||
|
#endif /* LWIP_RAND */
|
||||||
/* magic_randomseed += (magic_randomseed << 16) + TM1; */
|
/* magic_randomseed += (magic_randomseed << 16) + TM1; */
|
||||||
magic_randomseed += sys_jiffies() & 0xffff; /* XXX */
|
magic_randomseed += sys_jiffies() & 0xffff; /* XXX */
|
||||||
|
#ifndef LWIP_RAND
|
||||||
}
|
}
|
||||||
|
#endif /* LWIP_RAND */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user