modules/ble: swap error returns

This commit is contained in:
Lars Lehtonen 2019-11-13 17:08:41 -08:00
commit c980a7b4b2
No known key found for this signature in database
GPG key ID: 8137D474EBCB04F2

View file

@ -64,7 +64,7 @@ func (mod *BLERecon) doFilter(dev *network.BLEDevice) bool {
mod.selector.Expression.MatchString(dev.Vendor)
}
func (mod *BLERecon) doSelection() (err error, devices []*network.BLEDevice) {
func (mod *BLERecon) doSelection() (devices []*network.BLEDevice, err error) {
if err = mod.selector.Update(); err != nil {
return
}
@ -127,7 +127,7 @@ func (mod *BLERecon) colNames(withName bool) []string {
}
func (mod *BLERecon) Show() error {
err, devices := mod.doSelection()
devices, err := mod.doSelection()
if err != nil {
return err
}