# HG changeset patch # User Matt Johnston # Date 1143365203 0 # Node ID 36d21680a9d31dd40db0ff39d41c388a2228d0f5 # Parent fb3678bdb8c791a12b27bac82d0562903aa4ec1a A few more fixups, make sure that variable declarations are the first thing in a function diff -r fb3678bdb8c7 -r 36d21680a9d3 cli-chansession.c --- a/cli-chansession.c Sat Mar 25 12:57:44 2006 +0000 +++ b/cli-chansession.c Sun Mar 26 09:26:43 2006 +0000 @@ -168,9 +168,9 @@ unsigned int value; unsigned int mapcode; - TRACE(("enter put_termcodes")) + unsigned int bufpos1, bufpos2; - unsigned int bufpos1, bufpos2; + TRACE(("enter put_termcodes")) if (tcgetattr(STDIN_FILENO, &tio) == -1) { dropbear_log(LOG_WARNING, "Failed reading termmodes"); diff -r fb3678bdb8c7 -r 36d21680a9d3 random.c --- a/random.c Sat Mar 25 12:57:44 2006 +0000 +++ b/random.c Sun Mar 26 09:26:43 2006 +0000 @@ -134,7 +134,7 @@ hash_state hs; /* initialise so that things won't warn about - * hashing an undefined buffer */ + * hashing an undefined buffer */ if (!donerandinit) { m_burn(hashpool, sizeof(hashpool)); } @@ -157,17 +157,17 @@ * the random pools for fork()ed processes. */ void reseedrandom() { - pid_t pid; - struct timeval tv; + pid_t pid; + hash_state hs; + struct timeval tv; if (!donerandinit) { dropbear_exit("seedrandom not done"); } - pid = getpid(); - gettimeofday(&tv, NULL); + pid = getpid(); + gettimeofday(&tv, NULL); - hash_state hs; sha1_init(&hs); sha1_process(&hs, (void*)hashpool, sizeof(hashpool)); sha1_process(&hs, (void*)&pid, sizeof(pid));