mirror of
https://git.zx2c4.com/wireguard-go
synced 2024-11-15 01:05:15 +01:00
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>
This commit is contained in:
parent
675aae2423
commit
db3fa1409c
@ -247,12 +247,7 @@ func (device *Device) IpcSetOperation(r io.Reader) error {
|
|||||||
logError.Println("Failed to create new peer:", err)
|
logError.Println("Failed to create new peer:", err)
|
||||||
return &IPCError{ipc.IpcErrorInvalid}
|
return &IPCError{ipc.IpcErrorInvalid}
|
||||||
}
|
}
|
||||||
if peer == nil {
|
logDebug.Println(peer, "- UAPI: Created")
|
||||||
dummy = true
|
|
||||||
peer = &Peer{}
|
|
||||||
} else {
|
|
||||||
logDebug.Println(peer, "- UAPI: Created")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "update_only":
|
case "update_only":
|
||||||
|
Loading…
Reference in New Issue
Block a user