Mercurial > dropbear
changeset 298:7dad470ad4aa
minor cleanups for some warnings
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 22 Mar 2006 05:12:18 +0000 |
parents | 03f65e461915 |
children | fb3678bdb8c7 |
files | random.c svr-main.c |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/random.c Sat Mar 11 14:59:34 2006 +0000 +++ b/random.c Wed Mar 22 05:12:18 2006 +0000 @@ -31,7 +31,8 @@ /* this is used to generate unique output from the same hashpool */ static uint32_t counter = 0; -#define MAX_COUNTER 1<<31 /* the max value for the counter, so it won't loop */ +/* the max value for the counter, so it won't integer overflow */ +#define MAX_COUNTER 1<<30 static unsigned char hashpool[SHA1_HASH_SIZE]; @@ -167,7 +168,6 @@ gettimeofday(&tv, NULL); hash_state hs; - unsigned char hash[SHA1_HASH_SIZE]; sha1_init(&hs); sha1_process(&hs, (void*)hashpool, sizeof(hashpool)); sha1_process(&hs, (void*)&pid, sizeof(pid));
--- a/svr-main.c Sat Mar 11 14:59:34 2006 +0000 +++ b/svr-main.c Wed Mar 22 05:12:18 2006 +0000 @@ -28,6 +28,7 @@ #include "buffer.h" #include "signkey.h" #include "runopts.h" +#include "random.h" static size_t listensockets(int *sock, size_t sockcount, int *maxfd); static void sigchld_handler(int dummy);