[tor-commits] [snowflake/master] Remove unnecessary initialisation of last

cohosh at torproject.org cohosh at torproject.org
Tue Oct 8 14:30:16 UTC 2019


commit 01156e58eb138200eea84b4ce3f86b251b991a19
Author: Shane Howearth <Shane.h.1 at gmail.com>
Date:   Thu Sep 26 13:37:32 2019 +1000

    Remove unnecessary initialisation of last
    
    last was initialised twice (creating a shadow), the second time inside
    a case statement. The second initialisation is removed, keeping the use
    of last aligned to the isame style as its use other parts of the case
    statement.
---
 client/lib/util.go | 1 -
 1 file changed, 1 deletion(-)

diff --git a/client/lib/util.go b/client/lib/util.go
index f385279..f93bcbe 100644
--- a/client/lib/util.go
+++ b/client/lib/util.go
@@ -54,7 +54,6 @@ func (b *BytesSyncLogger) Log() {
 		case amount = <-b.OutboundChan:
 			b.Outbound += amount
 			b.OutEvents++
-			last := time.Now()
 			if time.Since(last) > time.Second*LogTimeInterval {
 				last = time.Now()
 				output()



More information about the tor-commits mailing list