diff --git a/cli-chansession.c b/cli-chansession.c
index 1dad6071adec67f95dfa8b03358111dadf7c966e..fee8a2238c0f17f8ab8e0a2c4c3ec72ae707ebdb 100644
--- a/cli-chansession.c
+++ b/cli-chansession.c
@@ -168,10 +168,10 @@ static void put_termcodes() {
 	unsigned int value;
 	unsigned int mapcode;
 
-	TRACE(("enter put_termcodes"))
-
 	unsigned int bufpos1, bufpos2;
 
+	TRACE(("enter put_termcodes"))
+
 	if (tcgetattr(STDIN_FILENO, &tio) == -1) {
 		dropbear_log(LOG_WARNING, "Failed reading termmodes");
 		buf_putint(ses.writepayload, 1); /* Just the terminator */
diff --git a/random.c b/random.c
index 5953a4374f991ecddc7d5dbffb5399be42887e76..c836de984a8c88eec8ec41fa89e7be3e6e0e82a3 100644
--- a/random.c
+++ b/random.c
@@ -134,7 +134,7 @@ void seedrandom() {
 	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 @@ void seedrandom() {
  * 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));