misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2019-02-22 14:48:32 +01:00
parent 0cbd6d7a9d
commit 2e5624917e
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -330,8 +330,7 @@ func (mod *BLERecon) showServices(p gatt.Peripheral, services []*gatt.Service) {
raw := ([]byte)(nil)
err := error(nil)
if isReadable {
raw, err = p.ReadCharacteristic(ch)
if raw != nil {
if raw, err = p.ReadCharacteristic(ch); raw != nil {
sz = len(raw)
}
}