diff random.c @ 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 7dad470ad4aa
children 08b69964e408 959c66ccf1b5 00703f1df67a
line wrap: on
line diff
--- 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));