Simplify preprocessor statements.
This commit is contained in:
parent
6546fdfaf8
commit
b2e7419a1d
@ -688,17 +688,18 @@ static void readscreen(void)
|
|||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#ifdef NO_FP_API
|
||||||
|
# undef DEVRANDOM
|
||||||
|
#endif
|
||||||
|
|
||||||
int RAND_poll(void)
|
int RAND_poll(void)
|
||||||
{
|
{
|
||||||
unsigned long l;
|
unsigned long l;
|
||||||
pid_t curr_pid = getpid();
|
pid_t curr_pid = getpid();
|
||||||
#ifndef NO_FP_API
|
|
||||||
#ifdef DEVRANDOM
|
#ifdef DEVRANDOM
|
||||||
FILE *fh;
|
FILE *fh;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NO_FP_API
|
|
||||||
#ifdef DEVRANDOM
|
#ifdef DEVRANDOM
|
||||||
/* Use a random entropy pool device. Linux, FreeBSD and OpenBSD
|
/* Use a random entropy pool device. Linux, FreeBSD and OpenBSD
|
||||||
* have this. Use /dev/urandom if you can as /dev/random may block
|
* have this. Use /dev/urandom if you can as /dev/random may block
|
||||||
@ -715,7 +716,6 @@ int RAND_poll(void)
|
|||||||
RAND_add(tmpbuf,sizeof tmpbuf,n);
|
RAND_add(tmpbuf,sizeof tmpbuf,n);
|
||||||
memset(tmpbuf,0,n);
|
memset(tmpbuf,0,n);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* put in some default random data, we need more than just this */
|
/* put in some default random data, we need more than just this */
|
||||||
@ -727,10 +727,8 @@ int RAND_poll(void)
|
|||||||
l=time(NULL);
|
l=time(NULL);
|
||||||
RAND_add(&l,sizeof(l),0);
|
RAND_add(&l,sizeof(l),0);
|
||||||
|
|
||||||
#ifndef NO_FP_API
|
|
||||||
#ifdef DEVRANDOM
|
#ifdef DEVRANDOM
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user