From 89d2c5ed7a054bc05a21209d5a9c79ad7151f8f7 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 3 Jan 2019 19:04:00 +0100 Subject: Extend structs rather than embed, when possible --- rwcancel/fdset.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rwcancel/fdset.go') diff --git a/rwcancel/fdset.go b/rwcancel/fdset.go index a46cfc7..28746e6 100644 --- a/rwcancel/fdset.go +++ b/rwcancel/fdset.go @@ -8,15 +8,15 @@ package rwcancel import "golang.org/x/sys/unix" type fdSet struct { - fdset unix.FdSet + unix.FdSet } func (fdset *fdSet) set(i int) { bits := 32 << (^uint(0) >> 63) - fdset.fdset.Bits[i/bits] |= 1 << uint(i%bits) + fdset.Bits[i/bits] |= 1 << uint(i%bits) } func (fdset *fdSet) check(i int) bool { bits := 32 << (^uint(0) >> 63) - return (fdset.fdset.Bits[i/bits] & (1 << uint(i%bits))) != 0 + return (fdset.Bits[i/bits] & (1 << uint(i%bits))) != 0 } -- cgit v1.2.3