# HG changeset patch # User Matt Johnston # Date 1143004338 0 # Node ID 7dad470ad4aa431e78a3c8c469e377a0ab71a94e # Parent 03f65e461915a940939e4cc689fc89721ffc40de minor cleanups for some warnings diff -r 03f65e461915 -r 7dad470ad4aa random.c --- 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)); diff -r 03f65e461915 -r 7dad470ad4aa svr-main.c --- 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);