diff options
author | Josh Bleecher Snyder <josh@tailscale.com> | 2020-12-04 16:05:51 -0800 |
---|---|---|
committer | Josh Bleecher Snyder <josh@tailscale.com> | 2020-12-08 14:25:10 -0800 |
commit | c4895658e629ed9d5154c73eb5585c12fdba5b4b (patch) | |
tree | eb19b838990a04e566dc5a497da16104fcd180b7 | |
parent | d3ff2d6b62b095f37582affe84e267d7e5be88c6 (diff) |
device: avoid copying lock in tests
This doesn't cause any practical problems as it is,
but vet (rightly) flags this code as copying a mutex.
It is easy to fix, so do so.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
-rw-r--r-- | device/peer_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/device/peer_test.go b/device/peer_test.go index 6aa238b..9c1ede5 100644 --- a/device/peer_test.go +++ b/device/peer_test.go @@ -26,7 +26,7 @@ func checkAlignment(t *testing.T, name string, offset uintptr) { func TestPeerAlignment(t *testing.T) { var p Peer - typ := reflect.TypeOf(p) + typ := reflect.TypeOf(&p).Elem() t.Logf("Peer type size: %d, with fields:", typ.Size()) for i := 0; i < typ.NumField(); i++ { field := typ.Field(i) |