lib: Use bytes.Equal instead of bytes.Compare where possible
This commit is contained in:
committed by
Audrius Butkevicius
parent
b6f32b6e45
commit
f5f0e46016
@@ -174,7 +174,7 @@ func (c *localClient) recvAnnouncements(b beacon.Interface) {
|
||||
l.Debugf("discover: Received local announcement from %s for %s", addr, protocol.DeviceIDFromBytes(pkt.This.ID))
|
||||
|
||||
var newDevice bool
|
||||
if bytes.Compare(pkt.This.ID, c.myID[:]) != 0 {
|
||||
if !bytes.Equal(pkt.This.ID, c.myID[:]) {
|
||||
newDevice = c.registerDevice(addr, pkt.This)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user