Merge pull request #830 from HarshCasper/master

Potential Code-Refactor and Bug Fixes
This commit is contained in:
Simone Margaritelli 2021-02-20 10:34:07 +01:00 committed by GitHub
commit 50c1505fd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -35144,7 +35144,7 @@ func ManufLookup(mac string) string {
macHex := strings.Replace(mac, ":", "", -1)
macInt := new(big.Int)
if _, ok := macInt.SetString(macHex, 16); ok == false {
if _, ok := macInt.SetString(macHex, 16); !ok {
return ""
}

View file

@ -64,9 +64,7 @@ func (ap *AccessPoint) RemoveClient(mac string) {
defer ap.Unlock()
bssid := NormalizeMac(mac)
if _, found := ap.clients[bssid]; found {
delete(ap.clients, bssid)
}
delete(ap.clients, bssid)
}
func (ap *AccessPoint) AddClientIfNew(bssid string, frequency int, rssi int8) (*Station, bool) {