dhcp.c: suppress warning in rfc951_sleep().
This commit is contained in:
parent
6afa449e2e
commit
d2866d5d21
12
dhcp.c
12
dhcp.c
@ -359,12 +359,20 @@ static void rfc951_sleep(int exp)
|
||||
long q;
|
||||
unsigned long tmo;
|
||||
|
||||
union {
|
||||
char c[sizeof(gen_hwaddr)];
|
||||
long l;
|
||||
short s[3];
|
||||
} hw;
|
||||
|
||||
if (exp > BACKOFF_LIMIT)
|
||||
exp = BACKOFF_LIMIT;
|
||||
|
||||
if (!seed)
|
||||
if (!seed) {
|
||||
/* Initialize linear congruential generator. */
|
||||
seed = (currticks () + *(long *) &gen_hwaddr + ((short *) gen_hwaddr)[2]);
|
||||
memcpy(&hw.c, &gen_hwaddr, sizeof(gen_hwaddr));
|
||||
seed = currticks() + hw.l + hw.s[2];
|
||||
}
|
||||
|
||||
/* Simplified version of the LCG given in Bruce Scheier's
|
||||
"Applied Cryptography". */
|
||||
|
Loading…
x
Reference in New Issue
Block a user