more lint driven refactoring

This commit is contained in:
evilsocket 2018-04-26 12:19:52 +02:00
commit 1afab5d7be
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
7 changed files with 19 additions and 26 deletions

View file

@ -115,7 +115,7 @@ func (w *WiFi) Remove(mac string) {
// get non printable characters .... (ref #61)
func isBogusMacESSID(essid string) bool {
for _, c := range essid {
if strconv.IsPrint(c) == false {
if !strconv.IsPrint(c) {
return true
}
}
@ -131,7 +131,7 @@ func (w *WiFi) AddIfNew(ssid, mac string, frequency int, rssi int8) *AccessPoint
ap.LastSeen = time.Now()
ap.RSSI = rssi
// always get the cleanest one
if isBogusMacESSID(ssid) == false {
if !isBogusMacESSID(ssid) {
ap.Hostname = ssid
}
return ap