diff options
author | Geoff Thorpe <geoff@openssl.org> | 2005-07-22 03:36:30 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2005-07-22 03:36:30 +0000 |
commit | 20a90e3a76135c34b4988ba3cc2835603d98639a (patch) | |
tree | 9e41e61db2abf5c8afa5a609711d2f5c9594b88c /crypto/rand/rand_unix.c | |
parent | 17a2994dbd83929d89ae452f77f4b6b1d073df46 (diff) |
Fix some signed/unsigned warnings.
Diffstat (limited to 'crypto/rand/rand_unix.c')
-rw-r--r-- | crypto/rand/rand_unix.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index 14837a7a7d..c340642515 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -155,7 +155,8 @@ int RAND_poll(void) #ifdef DEVRANDOM static const char *randomfiles[] = { DEVRANDOM }; struct stat randomstats[sizeof(randomfiles)/sizeof(randomfiles[0])]; - int fd,i; + int fd; + unsigned int i; #endif #ifdef DEVRANDOM_EGD static const char *egdsockets[] = { DEVRANDOM_EGD, NULL }; @@ -168,7 +169,8 @@ int RAND_poll(void) * have this. Use /dev/urandom if you can as /dev/random may block * if it runs out of random entries. */ - for (i=0; i<sizeof(randomfiles)/sizeof(randomfiles[0]) && n < ENTROPY_NEEDED; i++) + for (i = 0; (i < sizeof(randomfiles)/sizeof(randomfiles[0])) && + (n < ENTROPY_NEEDED); i++) { if ((fd = open(randomfiles[i], O_RDONLY #ifdef O_NONBLOCK @@ -185,7 +187,8 @@ int RAND_poll(void) { struct timeval t = { 0, 10*1000 }; /* Spend 10ms on each file. */ - int r,j; + int r; + unsigned int j; fd_set fset; struct stat *st=&randomstats[i]; |