From db3fa1409cae2113df73f1641d9fb1830fbcc696 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Fri, 15 Jan 2021 13:59:55 -0800 Subject: 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 --- device/uapi.go | 7 +------ 1 file changed, 1 insertion(+), 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": -- cgit v1.2.3