summaryrefslogtreecommitdiffhomepage
path: root/tun/tuntest
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-02-22 15:43:08 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-02-23 20:00:57 +0100
commitf9dac7099ef1dd46ed03e8aa8453f3c5211954b8 (patch)
tree4994384b00c61cffa01ba77f37300a694d1254b0 /tun/tuntest
parent9a29ae267cc4573f88f5d9871e2aa53ea201e873 (diff)
global: remove TODO name graffiti
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>
Diffstat (limited to 'tun/tuntest')
-rw-r--r--tun/tuntest/tuntest.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tun/tuntest/tuntest.go b/tun/tuntest/tuntest.go
index 92aa9d8..d89db71 100644
--- a/tun/tuntest/tuntest.go
+++ b/tun/tuntest/tuntest.go
@@ -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
}