]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
global: remove TODO name graffiti
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 22 Feb 2021 14:43:08 +0000 (15:43 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 23 Feb 2021 19:00:57 +0000 (20:00 +0100)
Googlers have a habit of graffiting their name in TODO items that then
are never addressed, and other people won't go near those because
they're marked territory of another animal. I've been gradually cleaning
these up as I see them, but this commit just goes all the way and
removes the remaining stragglers.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
device/noise-protocol.go
device/send.go
tun/tuntest/tuntest.go

index e89721f73de8d2dd90500b1ac17a6d6f6b82dd14..0212b7d42b2abd0f1d537cc4393f73ec7c614906 100644 (file)
@@ -20,7 +20,6 @@ import (
 
 type handshakeState int
 
-// TODO(crawshaw): add commentary describing each state and the transitions
 const (
        handshakeZeroed = handshakeState(iota)
        handshakeInitiationCreated
index 6a3b30b9b5c0661616661643d3aa623cdd0fe4e0..cb1607bd0329b22b92acaa765fd529627f232c5e 100644 (file)
@@ -421,7 +421,7 @@ func (peer *Peer) RoutineSequentialSender() {
                        // This is an optimization only. It is possible for the peer to be stopped
                        // immediately after this check, in which case, elem will get processed.
                        // The timers and SendBuffer code are resilient to a few stragglers.
-                       // TODO(josharian): rework peer shutdown order to ensure
+                       // TODO: rework peer shutdown order to ensure
                        // that we never accidentally keep timers alive longer than necessary.
                        device.PutMessageBuffer(elem.buffer)
                        device.PutOutboundElement(elem)
index 92aa9d82b959edc8fa28b657997c0515feb30c22..d89db718724ec6149521fa71cc09d6c7897ff8e4 100644 (file)
@@ -113,7 +113,7 @@ func (t *chTun) File() *os.File { return nil }
 func (t *chTun) Read(data []byte, offset int) (int, error) {
        select {
        case <-t.c.closed:
-               return 0, io.EOF // TODO(crawshaw): what is the correct error value?
+               return 0, os.ErrClosed
        case msg := <-t.c.Outbound:
                return copy(data[offset:], msg), nil
        }
@@ -130,7 +130,7 @@ func (t *chTun) Write(data []byte, offset int) (int, error) {
        copy(msg, data[offset:])
        select {
        case <-t.c.closed:
-               return 0, io.EOF // TODO(crawshaw): what is the correct error value?
+               return 0, os.ErrClosed
        case t.c.Inbound <- msg:
                return len(data) - offset, nil
        }