]> Cypherpunks.ru repositories - govpn.git/commitdiff
Nicer code construction
authorSergey Matveev <stargrave@stargrave.org>
Fri, 1 May 2015 19:26:38 +0000 (22:26 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 1 May 2015 19:26:38 +0000 (22:26 +0300)
Signed-off-by: Sergey Matveev <stargrave@stargrave.org>
transport.go

index 09b8bddb7cb84b30980cd949e63c992afcf61a89..f15f4fc945aa582a350d99e72de8de5545708f1b 100644 (file)
@@ -296,7 +296,7 @@ func (p *Peer) EthProcess(ethPkt []byte, conn WriteToer, ready chan struct{}) {
                p.HeartbeatSent++
        }
 
-       p.NonceOur = p.NonceOur + 2
+       p.NonceOur += 2
        copy(p.nonce, Emptiness)
        binary.PutUvarint(p.nonce, p.NonceOur)
        p.NonceCipher.Encrypt(p.nonce, p.nonce)