summaryrefslogtreecommitdiffhomepage
path: root/device/uapi.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2021-01-15 13:59:55 -0800
committerJosh Bleecher Snyder <josh@tailscale.com>2021-01-25 08:47:48 -0800
commitdb3fa1409cae2113df73f1641d9fb1830fbcc696 (patch)
tree91f6767be61bb1dbb18ab3800d1a0efe45fbe4e5 /device/uapi.go
parent675aae24232750e5a41c0a10bb1195fa4bb63d42 (diff)
device: remove dead code
If device.NewPeer returns a nil error, then the returned peer is always non-nil. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'device/uapi.go')
-rw-r--r--device/uapi.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/device/uapi.go b/device/uapi.go
index dbb60b6..4436e72 100644
--- a/device/uapi.go
+++ b/device/uapi.go
@@ -247,12 +247,7 @@ func (device *Device) IpcSetOperation(r io.Reader) error {
logError.Println("Failed to create new peer:", err)
return &IPCError{ipc.IpcErrorInvalid}
}
- if peer == nil {
- dummy = true
- peer = &Peer{}
- } else {
- logDebug.Println(peer, "- UAPI: Created")
- }
+ logDebug.Println(peer, "- UAPI: Created")
}
case "update_only":