changeset 311:36d21680a9d3

A few more fixups, make sure that variable declarations are the first thing in a function
author Matt Johnston <matt@ucc.asn.au>
date Sun, 26 Mar 2006 09:26:43 +0000
parents fb3678bdb8c7
children 3eea61bd9993 ed910547d449
files cli-chansession.c random.c
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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");
--- 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));