Merge pull request #1 from HarshCasper/deepsource-fix-dd2afe80

Remove unnecessary guard around `delete`
This commit is contained in:
Harsh Bardhan Mishra 2021-02-01 14:18:51 +05:30 committed by GitHub
commit 91386cc725
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)
}
}
func (ap *AccessPoint) AddClientIfNew(bssid string, frequency int, rssi int8) (*Station, bool) {